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>
This commit is contained in:

committed by
John W. Linville

orang tua
40333e4fb4
melakukan
d9fe60dea7
@@ -550,7 +550,7 @@ static void iwl_ht_cap_to_ie(const struct ieee80211_supported_band *sband,
|
||||
{
|
||||
struct ieee80211_ht_cap *ht_cap;
|
||||
|
||||
if (!sband || !sband->ht_info.ht_supported)
|
||||
if (!sband || !sband->ht_cap.ht_supported)
|
||||
return;
|
||||
|
||||
if (*left < sizeof(struct ieee80211_ht_cap))
|
||||
@@ -559,12 +559,12 @@ static void iwl_ht_cap_to_ie(const struct ieee80211_supported_band *sband,
|
||||
*pos++ = sizeof(struct ieee80211_ht_cap);
|
||||
ht_cap = (struct ieee80211_ht_cap *) pos;
|
||||
|
||||
ht_cap->cap_info = cpu_to_le16(sband->ht_info.cap);
|
||||
memcpy(ht_cap->supp_mcs_set, sband->ht_info.supp_mcs_set, 16);
|
||||
ht_cap->cap_info = cpu_to_le16(sband->ht_cap.cap);
|
||||
memcpy(&ht_cap->mcs, &sband->ht_cap.mcs, 16);
|
||||
ht_cap->ampdu_params_info =
|
||||
(sband->ht_info.ampdu_factor & IEEE80211_HT_CAP_AMPDU_FACTOR) |
|
||||
((sband->ht_info.ampdu_density << 2) &
|
||||
IEEE80211_HT_CAP_AMPDU_DENSITY);
|
||||
(sband->ht_cap.ampdu_factor & IEEE80211_HT_AMPDU_PARM_FACTOR) |
|
||||
((sband->ht_cap.ampdu_density << 2) &
|
||||
IEEE80211_HT_AMPDU_PARM_DENSITY);
|
||||
*left -= sizeof(struct ieee80211_ht_cap);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user