aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-11-18 14:32:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-21 16:22:06 -0500
commitef96a84202ccfb48a4569256ffba45e32308f7ee (patch)
tree708275d21455ecbf3b5408241b73f95fa4c484e0 /net/mac80211/util.c
parent7e7c8926b2f4e3453b8aeb39cd814d2af3fec24f (diff)
mac80211: Support ht-cap over-rides.
This implements ht-cap over-rides for mac80211 drivers. HT may be disabled, making an /a/b/g/n station act like an a/b/g station. HT40 may be disabled forcing the station to be HT20 even if the AP and local hardware support HT40. MAX-AMSDU may be disabled. AMPDU-Density may be increased. AMPDU-Factor may be decreased. This has been successfully tested with ath9k using patched wpa_supplicant and iw. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index e2cb00df8c36..1118393d79de 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -979,7 +979,8 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
979 } 979 }
980 980
981 if (sband->ht_cap.ht_supported) 981 if (sband->ht_cap.ht_supported)
982 pos = ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap); 982 pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap,
983 sband->ht_cap.cap);
983 984
984 /* 985 /*
985 * If adding more here, adjust code in main.c 986 * If adding more here, adjust code in main.c
@@ -1518,7 +1519,7 @@ void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif)
1518} 1519}
1519EXPORT_SYMBOL(ieee80211_disable_rssi_reports); 1520EXPORT_SYMBOL(ieee80211_disable_rssi_reports);
1520 1521
1521u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband, 1522u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1522 u16 cap) 1523 u16 cap)
1523{ 1524{
1524 __le16 tmp; 1525 __le16 tmp;
@@ -1533,13 +1534,13 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
1533 pos += sizeof(u16); 1534 pos += sizeof(u16);
1534 1535
1535 /* AMPDU parameters */ 1536 /* AMPDU parameters */
1536 *pos++ = sband->ht_cap.ampdu_factor | 1537 *pos++ = ht_cap->ampdu_factor |
1537 (sband->ht_cap.ampdu_density << 1538 (ht_cap->ampdu_density <<
1538 IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT); 1539 IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
1539 1540
1540 /* MCS set */ 1541 /* MCS set */
1541 memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); 1542 memcpy(pos, &ht_cap->mcs, sizeof(ht_cap->mcs));
1542 pos += sizeof(sband->ht_cap.mcs); 1543 pos += sizeof(ht_cap->mcs);
1543 1544
1544 /* extended capabilities */ 1545 /* extended capabilities */
1545 pos += sizeof(__le16); 1546 pos += sizeof(__le16);