MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ht_getrate

Function ht_getrate

freebsd/net80211/ieee80211_ht.c:321–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321static int
322ht_getrate(struct ieee80211com *ic, int index, enum ieee80211_phymode mode,
323 int ratetype)
324{
325 int mword, rate;
326
327 mword = ieee80211_rate2media(ic, index | IEEE80211_RATE_MCS, mode);
328 if (IFM_SUBTYPE(mword) != IFM_IEEE80211_MCS)
329 return (0);
330 switch (ratetype) {
331 case 0:
332 rate = ieee80211_htrates[index].ht20_rate_800ns;
333 break;
334 case 1:
335 rate = ieee80211_htrates[index].ht20_rate_400ns;
336 break;
337 case 2:
338 rate = ieee80211_htrates[index].ht40_rate_800ns;
339 break;
340 default:
341 rate = ieee80211_htrates[index].ht40_rate_400ns;
342 break;
343 }
344 return (rate);
345}
346
347static struct printranges {
348 int minmcs;

Callers 1

ht_rateprintFunction · 0.85

Calls 1

ieee80211_rate2mediaFunction · 0.85

Tested by

no test coverage detected