aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2007-07-27 15:43:43 +0200
committerJohn W. Linville <linville@tuxdriver.com>2007-10-25 16:36:13 -0400
commitad097a32e9adfd2c7e81740d77931068968cda82 (patch)
treea7e756767bf7d25931c4c3d19bd378135fe0538c
parentd1b51fa48afa42acaee31535e9ef3970f8614ded (diff)
downloadwireless-legacy-mac80211-dungeon.tar.gz
[PATCH] mac80211 [HT] 802.11 code compiles under CONFIG_MAC80211_HTmac80211-dungeon
This patch provides compilation of 802.11n HT features under CONFIG_MAC80211_HT Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/net/mac80211.h8
-rw-r--r--net/mac80211/ieee80211_sta.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 6b1a6fcc3215c3..ec758cc17a904e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1001,13 +1001,13 @@ enum ieee80211_erp_change_flags {
* this is only used for IBSS mode debugging and, as such, is not a
* required function. Must be atomic.
*
- * @handle_ba_action: Call low level driver with 11n Block Ack action.
- *
* @reset_tsf: 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.
*
+ * @handle_ba_action: Call low level driver with 11n Block Ack action.
+ *
* @conf_ht: Configure ht parameters.
*
* @get_ht_capab: Get ht capabilities from the device.
@@ -1071,14 +1071,16 @@ struct ieee80211_ops {
int (*get_tx_stats)(struct ieee80211_hw *hw,
struct ieee80211_tx_queue_stats *stats);
u64 (*get_tsf)(struct ieee80211_hw *hw);
+ void (*reset_tsf)(struct ieee80211_hw *hw);
+#ifdef CONFIG_MAC80211_HT
int (*handle_ba_action)(struct ieee80211_hw *hw,
struct ieee80211_mgmt *mgmt);
- void (*reset_tsf)(struct ieee80211_hw *hw);
int (*conf_ht)(struct ieee80211_hw *hw,
struct ieee80211_ht_capability *ht_cap_param,
struct ieee80211_ht_additional_info *ht_extra_param);
void (*get_ht_capab)(struct ieee80211_hw *hw,
struct ieee80211_ht_capability *ht_cap_param);
+#endif /* CONFIG_MAC80211_HT */
int (*beacon_update)(struct ieee80211_hw *hw,
struct sk_buff *skb,
struct ieee80211_tx_control *control);
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index bb5342f1b9e036..c445a83802003d 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -679,6 +679,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->flags & IEEE80211_STA_HT_ENABLED) &&
local->ops->get_ht_capab) {
@@ -689,6 +690,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;
@@ -1724,7 +1726,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->flags & IEEE80211_STA_HT_ENABLED) && local->ops->conf_ht) {
int rc;
@@ -1738,6 +1740,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);
@@ -2504,6 +2507,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,
@@ -2546,6 +2550,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,
@@ -2629,6 +2634,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:
@@ -2666,7 +2672,7 @@ static void ieee80211_rx_mgmt_action(struct net_device *dev,
break;
}
break;
-
+#endif /* CONFIG_MAC80211_HT */
default:
break;
}