mwifiex: use IEEE80211_HT_CAP_ macros for 11n cap_info

The hw_dot_11n_dev_cap reported by firmware hw_spec
has different format than the 11n capabilities.
Hence a lot of SET_ and RESET_ bit operation macros
were used to convert the dev_cap format to 11n
capability format. However the locally defined 11n
ht_cap macros are not necessary as we can use
IEEE80211_HT_CAP_ macros directly.

The 32-bit dev_cap bitmap is added as comment to
explain the mapping between firmware and 11n spec.

Some unused macros and unnecessary adapter variables
are also removed.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 8ffb6a8..08fa721 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -970,16 +970,16 @@
 			       cpu_to_le16(sizeof(struct ieee80211_ht_cap));
 			ht_cap_info = le16_to_cpu(ht_cap->ht_cap.cap_info);
 
-			SETHT_SHORTGI20(ht_cap_info);
+			ht_cap_info |= IEEE80211_HT_CAP_SGI_20;
 			if (adapter->chan_offset) {
-				SETHT_SHORTGI40(ht_cap_info);
-				SETHT_DSSSCCK40(ht_cap_info);
-				SETHT_SUPPCHANWIDTH(ht_cap_info);
+				ht_cap_info |= IEEE80211_HT_CAP_SGI_40;
+				ht_cap_info |= IEEE80211_HT_CAP_DSSSCCK40;
+				ht_cap_info |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
 				SETHT_MCS32(ht_cap->ht_cap.mcs.rx_mask);
 			}
 
 			ht_cap->ht_cap.ampdu_params_info
-					= MAX_RX_AMPDU_SIZE_64K;
+					= IEEE80211_HT_MAX_AMPDU_64K;
 			ht_cap->ht_cap.mcs.rx_mask[0] = 0xff;
 			pos += sizeof(struct mwifiex_ie_types_htcap);
 			cmd_append_size +=
@@ -999,7 +999,8 @@
 			if (adapter->chan_offset) {
 				ht_info->ht_info.ht_param =
 					adapter->chan_offset;
-				SET_CHANWIDTH40(ht_info->ht_info.ht_param);
+				ht_info->ht_info.ht_param |=
+					IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
 			}
 			ht_info->ht_info.operation_mode =
 				cpu_to_le16(NON_GREENFIELD_STAS);