iwlwifi: remove pointless HT check
authorJohannes Berg <johannes.berg@intel.com>
Fri, 30 Apr 2010 18:30:50 +0000 (11:30 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 10 May 2010 22:09:07 +0000 (15:09 -0700)
Remove the check before invoking iwl_set_ht_add_station(),
since neither of the conditions in this check makes sense,
as either we pass in a NULL ht_info (first branch) or in
the IBSS case an ht_info with ht_enabled=false.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-sta.c

index c15098ed0416c9ddd877f80cd02d6efdfea41bb6..85ed235ac901c446f9efdb924d6f02009b81f706 100644 (file)
@@ -284,10 +284,12 @@ static u8 iwl_prep_station(struct iwl_priv *priv, const u8 *addr,
        station->sta.sta.sta_id = sta_id;
        station->sta.station_flags = 0;
 
-       /* BCAST station and IBSS stations do not work in HT mode */
-       if (sta_id != priv->hw_params.bcast_sta_id &&
-           priv->iw_mode != NL80211_IFTYPE_ADHOC)
-               iwl_set_ht_add_station(priv, sta_id, ht_info);
+       /*
+        * OK to call unconditionally, since local stations (IBSS BSSID
+        * STA and broadcast STA) pass in a NULL ht_info, and mac80211
+        * doesn't allow HT IBSS.
+        */
+       iwl_set_ht_add_station(priv, sta_id, ht_info);
 
        /* 3945 only */
        rate = (priv->band == IEEE80211_BAND_5GHZ) ?