aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-09 06:13:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:06 -0400
commitd9fe60dea7779d412b34679f1177c5ca1940ea8d (patch)
treea51e16b013f7c1d16ded502cb32c03872bcbfcaa /drivers/net/wireless/mac80211_hwsim.c
parent40333e4fb476014cdd939d27e20eb54573172b32 (diff)
802.11: clean up/fix HT support
This patch cleans up a number of things: * the unusable definition of the HT capabilities/HT information information elements * variable names that are hard to understand * mac80211: move ieee80211_handle_ht to ht.c and remove the unused enable_ht parameter * mac80211: fix bug with MCS rate 32 in ieee80211_handle_ht * mac80211: fix bug with casting the result of ieee80211_bss_get_ie to an information element _contents_ rather than the whole element, add size checking (another out-of-bounds access bug fixed!) * mac80211: remove some unused return values in favour of BUG_ON checking * a few minor other things Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index e23d9a52d083..3f236b546683 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -563,19 +563,18 @@ static int __init init_mac80211_hwsim(void)
563 data->band.n_channels = ARRAY_SIZE(hwsim_channels); 563 data->band.n_channels = ARRAY_SIZE(hwsim_channels);
564 data->band.bitrates = data->rates; 564 data->band.bitrates = data->rates;
565 data->band.n_bitrates = ARRAY_SIZE(hwsim_rates); 565 data->band.n_bitrates = ARRAY_SIZE(hwsim_rates);
566 data->band.ht_info.ht_supported = 1; 566 data->band.ht_cap.ht_supported = true;
567 data->band.ht_info.cap = IEEE80211_HT_CAP_SUP_WIDTH | 567 data->band.ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
568 IEEE80211_HT_CAP_GRN_FLD | 568 IEEE80211_HT_CAP_GRN_FLD |
569 IEEE80211_HT_CAP_SGI_40 | 569 IEEE80211_HT_CAP_SGI_40 |
570 IEEE80211_HT_CAP_DSSSCCK40; 570 IEEE80211_HT_CAP_DSSSCCK40;
571 data->band.ht_info.ampdu_factor = 0x3; 571 data->band.ht_cap.ampdu_factor = 0x3;
572 data->band.ht_info.ampdu_density = 0x6; 572 data->band.ht_cap.ampdu_density = 0x6;
573 memset(data->band.ht_info.supp_mcs_set, 0, 573 memset(&data->band.ht_cap.mcs, 0,
574 sizeof(data->band.ht_info.supp_mcs_set)); 574 sizeof(data->band.ht_cap.mcs));
575 data->band.ht_info.supp_mcs_set[0] = 0xff; 575 data->band.ht_cap.mcs.rx_mask[0] = 0xff;
576 data->band.ht_info.supp_mcs_set[1] = 0xff; 576 data->band.ht_cap.mcs.rx_mask[1] = 0xff;
577 data->band.ht_info.supp_mcs_set[12] = 577 data->band.ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
578 IEEE80211_HT_CAP_MCS_TX_DEFINED;
579 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &data->band; 578 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &data->band;
580 579
581 err = ieee80211_register_hw(hw); 580 err = ieee80211_register_hw(hw);