diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-27 11:53:46 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-08-27 11:53:46 -0400 |
commit | a194e3249baf954dc34c67cdad5b8bed36f49e72 (patch) | |
tree | 2010fbba8fdae3179a1439f2038e30694a85124f /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | 751ca305d0e37f0d44b6a261e7db31aa6b60fbf4 (diff) |
iwlwifi: contextify broadcast station
The broadcast station ID is per context, so
add a variable for the ID in the context and
use it everywhere we previously hardcoded it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index f919977d5632..cb3c173e7c86 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -1163,6 +1163,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1163 | }; | 1163 | }; |
1164 | struct iwl_scan_cmd *scan; | 1164 | struct iwl_scan_cmd *scan; |
1165 | struct ieee80211_conf *conf = NULL; | 1165 | struct ieee80211_conf *conf = NULL; |
1166 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | ||
1166 | u32 rate_flags = 0; | 1167 | u32 rate_flags = 0; |
1167 | u16 cmd_len; | 1168 | u16 cmd_len; |
1168 | u16 rx_chain = 0; | 1169 | u16 rx_chain = 0; |
@@ -1175,6 +1176,9 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1175 | u8 active_chains; | 1176 | u8 active_chains; |
1176 | u8 scan_tx_antennas = priv->hw_params.valid_tx_ant; | 1177 | u8 scan_tx_antennas = priv->hw_params.valid_tx_ant; |
1177 | 1178 | ||
1179 | if (vif) | ||
1180 | ctx = iwl_rxon_ctx_from_vif(vif); | ||
1181 | |||
1178 | conf = ieee80211_get_hw_conf(priv->hw); | 1182 | conf = ieee80211_get_hw_conf(priv->hw); |
1179 | 1183 | ||
1180 | cancel_delayed_work(&priv->scan_check); | 1184 | cancel_delayed_work(&priv->scan_check); |
@@ -1283,7 +1287,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1283 | IWL_DEBUG_SCAN(priv, "Start passive scan.\n"); | 1287 | IWL_DEBUG_SCAN(priv, "Start passive scan.\n"); |
1284 | 1288 | ||
1285 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; | 1289 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; |
1286 | scan->tx_cmd.sta_id = priv->hw_params.bcast_sta_id; | 1290 | scan->tx_cmd.sta_id = ctx->bcast_sta_id; |
1287 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 1291 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
1288 | 1292 | ||
1289 | switch (priv->scan_band) { | 1293 | switch (priv->scan_band) { |
@@ -1446,7 +1450,8 @@ int iwlagn_manage_ibss_station(struct iwl_priv *priv, | |||
1446 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 1450 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
1447 | 1451 | ||
1448 | if (add) | 1452 | if (add) |
1449 | return iwl_add_bssid_station(priv, vif->bss_conf.bssid, true, | 1453 | return iwl_add_bssid_station(priv, vif_priv->ctx, |
1454 | vif->bss_conf.bssid, true, | ||
1450 | &vif_priv->ibss_bssid_sta_id); | 1455 | &vif_priv->ibss_bssid_sta_id); |
1451 | return iwl_remove_station(priv, vif_priv->ibss_bssid_sta_id, | 1456 | return iwl_remove_station(priv, vif_priv->ibss_bssid_sta_id, |
1452 | vif->bss_conf.bssid); | 1457 | vif->bss_conf.bssid); |