Skip to contentSkip to conversation

iwlwifi: Fix HT compilation breakage caused by cfg80211 API for channels/bitrates patch

PATCH New Tomas Winkler 1 participant 1 message Feb 6, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: Fix HT compilation breakage caused by cfg80211 API for channels/bitrates patch

This patch fixes compilation breakage caused by 'cfg80211 API for channels/bitrates' patch.
however it doesn't fix the driver's functional problems caused by that patch.

---
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c  |    2 +-
 drivers/net/wireless/iwlwifi/iwl-4965.c     |   11 ++-
 drivers/net/wireless/iwlwifi/iwl-4965.h     |   18 ++++--
 drivers/net/wireless/iwlwifi/iwl4965-base.c |   83 ++++++++++-----------------
 4 files changed, 50 insertions(+), 64 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-rs.c +1 -1
index f018ce4..a8223c4 100644
@@ -464,7 +464,7 @@ static void rs_tx_status(void *priv_rate,
 	IWL_DEBUG_RATE("enter\n");
 
 	retries = tx_resp->retry_count;
-
+	/* FIXME : this is wrong */
 	first_index = &sband->bitrates[0] - tx_resp->control.tx_rate;
 	if ((first_index < 0) || (first_index >= IWL_RATE_COUNT)) {
 		IWL_DEBUG_RATE("leave: Rate out of bounds: %d\n", first_index);
drivers/net/wireless/iwlwifi/iwl-4965.c +7 -4
index 79545d6..b636b06 100644
@@ -3459,14 +3459,15 @@ static int parse_elems(u8 *start, size_t len, struct ieee802_11_elems *elems)
 	return 0;
 }
 
-void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, int mode)
+void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
+			      enum ieee80211_band band)
 {
 	ht_info->cap = 0;
 	memset(ht_info->supp_mcs_set, 0, 16);
 
 	ht_info->ht_supported = 1;
 
-	if (mode == MODE_IEEE80211A) {
+	if (band == IEEE80211_BAND_5GHZ) {
 		ht_info->cap |= (u16)IEEE80211_HT_CAP_SUP_WIDTH;
 		ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_40;
 		ht_info->supp_mcs_set[4] = 0x01;
@@ -3896,7 +3897,9 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv,
 	tx_status->flags |= IEEE80211_TX_STATUS_AMPDU;
 	tx_status->ampdu_ack_map = successes;
 	tx_status->ampdu_ack_len = agg->frame_count;
+	/* FIXME Wrong rate
 	tx_status->control.tx_rate = agg->rate_n_flags;
+	*/
 
 	IWL_DEBUG_TX_REPLY("Bitmap %llx\n", bitmap);
 
@@ -4218,7 +4221,7 @@ void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
 
 static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
 				       enum ieee80211_band band,
-				   u16 channel, u8 extension_chan_offset)
+				       u16 channel, u8 extension_chan_offset)
 {
 	const struct iwl4965_channel_info *ch_info;
 
@@ -4252,7 +4255,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
 			return 0;
 	}
 
-	return (iwl4965_is_channel_extension(priv, priv->phymode,
+	return (iwl4965_is_channel_extension(priv, priv->band,
 					 iwl_ht_conf->control_channel,
 					 iwl_ht_conf->extension_chan_offset));
 }
drivers/net/wireless/iwlwifi/iwl-4965.h +11 -7
index cb8f7f2..45cf483 100644
@@ -772,17 +772,21 @@ extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
 extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv);
 
 #ifdef CONFIG_IWL4965_HT
-extern void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
-					int mode);
-extern void iwl4965_set_rxon_ht(struct iwl4965_priv *priv,
-				struct iwl_ht_info *ht_info);
-extern void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
+void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
+			      enum ieee80211_band band);
+void iwl4965_set_rxon_ht(struct iwl4965_priv *priv,
+			 struct iwl_ht_info *ht_info);
+void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
 				struct ieee80211_ht_info *sta_ht_inf);
-extern int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
+int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
 				    enum ieee80211_ampdu_mlme_action action,
 				    const u8 *addr, u16 tid, u16 *ssn);
-extern int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id,
+int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id,
 					u8 tid, int txq_id);
+#else
+static inline void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
+					    enum ieee80211_band band) {}
+
 #endif /*CONFIG_IWL4965_HT */
 /* Structures, enum, and defines specific to the 4965 */
 
drivers/net/wireless/iwlwifi/iwl4965-base.c +31 -52

167 lines not on this page · raw message

Signature · 9 lines
1.5.2.2

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.