[PATCH] 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 <tomas.winkler@intel.com>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 6b1a6fc..ec758cc 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1001,13 +1001,13 @@
  *	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 @@
 	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 bb5342f..c445a83 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -679,6 +679,7 @@
 		*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 @@
 		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 @@
 				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 @@
 			sta->flags |= WLAN_STA_HT;
 	}
 
+#endif	/* CONFIG_MAC80211_HT */
 
 	rate_control_rate_init(sta, local);
 
@@ -2504,6 +2507,7 @@
 	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 @@
 
 	return;
 }
+#endif /* CONFIG_MAC80211_HT */
 
 static void ieee80211_rx_mgmt_action(struct net_device *dev,
 				     struct ieee80211_if_sta *ifsta,
@@ -2629,6 +2634,7 @@
 		}
 		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 @@
 			break;
 		}
 		break;
-
+#endif /* CONFIG_MAC80211_HT */
 	default:
 		break;
 	}