mac80211 [HT] adding MAC80211_HT and MAC80211_HT_DEBUG
PATCH 1/2 mac80211 [HT] adding MAC80211_HT and MAC80211_HT_DEBUG
This patch adds MAC80211_HT and MAC80211_HT_DEBUG config variables to separate HT features
Signed-off-by Tomas Winkler <[email protected]>
--- net/mac80211/Kconfig | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
net/mac80211/Kconfig +13 -0
@@ -20,6 +20,13 @@ config MAC80211_LEDS This option enables a few LED triggers for different packet receive/transmit events. +config MAC80211_HT + bool "Enable 802.11n HT Features" + depends on MAC80211 + ---help--- + This option enables 802.11n High Throughput features + such as MIMO, AMPDU and AMSDU aggregation + config MAC80211_DEBUGFS bool "Export mac80211 internals in DebugFS" depends on MAC80211 && DEBUG_FS
@@ -39,6 +46,12 @@ config MAC80211_DEBUG If you are not trying to debug or develop the ieee80211 subsystem, you most likely want to say N here. +config MAC80211_HT_DEBUG + bool "Enables HT debugging output" + depends on MAC80211_HT && MAC80211_DEBUG + ---help--- + Select this to see debugging information about HT + config MAC80211_VERBOSE_DEBUG bool "Verbose debugging output" depends on MAC80211_DEBUG
Signature · 1 line
1.5.2.2
PATCH 2/2 mac80211 [HT] 802.11 code compiles under CONFIG_MAC80211_HT
This patch provides compilation of 802.11n HT features under CONFIG_MAC80211_HT
Signed-off-by Tomas Winkler <[email protected]>
--- include/net/mac80211.h | 11 +++++++---- net/mac80211/ieee80211_sta.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-)
include/net/mac80211.h +7 -4
@@ -722,16 +722,17 @@ struct ieee80211_ops {* Must be atomic. */ u64 (*get_tsf)(struct ieee80211_hw *hw); -/* Call low level driver with 11n Block Ack action */ -int (*handle_ba_action)(struct ieee80211_hw *hw, -struct ieee80211_mgmt *mgmt); -/* Reset the TSF timer and allow firmware/hardware to synchronize with * other STAs in the IBSS. This is only used in IBSS mode. This * function is optional if the firmware/hardware takes full care of * TSF synchronization. */ void (*reset_tsf)(struct ieee80211_hw *hw); +#ifdef CONFIG_MAC80211_HT +/* Call low level driver with 11n Block Ack action */ +int (*handle_ba_action)(struct ieee80211_hw *hw, +struct ieee80211_mgmt *mgmt); +/* Configure ht parameters. */ int (*conf_ht)(struct ieee80211_hw *hw, struct ieee80211_ht_capability *ht_cap_param,
@@ -741,6 +742,8 @@ struct ieee80211_ops {void (*get_ht_capab)(struct ieee80211_hw *hw,struct ieee80211_ht_capability *ht_cap_param); +#endif /* CONFIG_MAC80211_HT */ +/* Setup beacon data for IBSS beacons. Unlike access point (Master), * IBSS uses a fixed beacon frame which is configured using this * function. This handler is required only for IBSS mode. */
net/mac80211/ieee80211_sta.c +8 -2
@@ -686,6 +686,7 @@ static void ieee80211_send_assoc(struct net_device *dev, *pos++ =0 ; } +#ifdef CONFIG_MAC80211_HT /* if low level driver supports 11n, fill in 11n IE */ if (ht_enabled && ifsta->ht_enabled && local->ops->get_ht_capab) { pos =skb_put (skb,sizeof (struct ieee80211_ht_capability )+2 );
@@ -695,6 +696,7 @@ static void ieee80211_send_assoc(struct net_device *dev, local->ops->get_ht_capab (local_to_hw (local), (struct ieee80211_ht_capability *)pos); } +#endif /* CONFIG_MAC80211_HT */ kfree (ifsta->assocreq_ies); ifsta->assocreq_ies_len = (skb->data + skb->len) - ies;
@@ -1740,7 +1742,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, rates |=BIT (j); } sta->supp_rates = rates; - +#ifdef CONFIG_MAC80211_HT if (elems.ht_extra_param && elems.ht_cap_param && elems.wmm_param && ifsta->ht_enabled && local->ops->conf_ht){int rc;
@@ -1754,6 +1756,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, sta->flags |= WLAN_STA_HT; } +#endif /* CONFIG_MAC80211_HT */ rate_control_rate_init (sta, local);
@@ -2516,6 +2519,7 @@ static void ieee80211_rx_mgmt_probe_req(struct net_device *dev,ieee80211_sta_tx (dev, skb,0 ); } +#ifdef CONFIG_MAC80211_HT static void ieee80211_send_addba_resp(struct net_device *dev, struct ieee80211_mgmt *mgmt_src, size_t len,
@@ -2558,6 +2562,7 @@ static void ieee80211_send_addba_resp(struct net_device *dev,return ; } +#endif /* CONFIG_MAC80211_HT */ static void ieee80211_rx_mgmt_action(struct net_device *dev, struct ieee80211_if_sta *ifsta,
@@ -2640,6 +2645,7 @@ static void ieee80211_rx_mgmt_action(struct net_device *dev, }break ; +#ifdef CONFIG_MAC80211_HT case WLAN_CATEGORY_BACK :switch (mgmt->u.action.u.addba_req.action_code) {case WLAN_ACTION_ADDBA_REQ :
@@ -2677,7 +2683,7 @@ static void ieee80211_rx_mgmt_action(struct net_device *dev, break; }break ; - +#endif /* CONFIG_MAC80211_HT */ default :break ; }
Signature · 1 line
1.5.2.2