Skip to content

Commit

Permalink
mac80211_hwsim: Add minimal IEEE 802.11n support
Browse files Browse the repository at this point in the history
Set some semi-random values for HT and add more queues to allow IEEE
802.11n association to be tested with mac80211_hwsim. This with the
latest hostapd git tree version can complete a simulated 802.11n
association successfully (with mac80211 client MLME).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Aug 29, 2008
1 parent 31ce12f commit 87e8b64
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,28 @@ static int __init init_mac80211_hwsim(void)
SET_IEEE80211_PERM_ADDR(hw, addr);

hw->channel_change_time = 1;
hw->queues = 1;
hw->queues = 4;
hw->ampdu_queues = 1;

memcpy(data->channels, hwsim_channels, sizeof(hwsim_channels));
memcpy(data->rates, hwsim_rates, sizeof(hwsim_rates));
data->band.channels = data->channels;
data->band.n_channels = ARRAY_SIZE(hwsim_channels);
data->band.bitrates = data->rates;
data->band.n_bitrates = ARRAY_SIZE(hwsim_rates);
data->band.ht_info.ht_supported = 1;
data->band.ht_info.cap = IEEE80211_HT_CAP_SUP_WIDTH |
IEEE80211_HT_CAP_GRN_FLD |
IEEE80211_HT_CAP_SGI_40 |
IEEE80211_HT_CAP_DSSSCCK40;
data->band.ht_info.ampdu_factor = 0x3;
data->band.ht_info.ampdu_density = 0x6;
memset(data->band.ht_info.supp_mcs_set, 0,
sizeof(data->band.ht_info.supp_mcs_set));
data->band.ht_info.supp_mcs_set[0] = 0xff;
data->band.ht_info.supp_mcs_set[1] = 0xff;
data->band.ht_info.supp_mcs_set[12] =
IEEE80211_HT_CAP_MCS_TX_DEFINED;
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &data->band;

err = ieee80211_register_hw(hw);
Expand Down

0 comments on commit 87e8b64

Please sign in to comment.