| 319 | } |
| 320 | |
| 321 | static int |
| 322 | ht_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 | |
| 347 | static struct printranges { |
| 348 | int minmcs; |
no test coverage detected