diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index a7c66c4e5f2a..8fa43d427811 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -210,6 +210,8 @@ static int iwlagn_rxon_disconn(struct iwl_priv *priv, | |||
210 | * keys, so we have to restore those afterwards. | 210 | * keys, so we have to restore those afterwards. |
211 | */ | 211 | */ |
212 | iwl_clear_ucode_stations(priv, ctx); | 212 | iwl_clear_ucode_stations(priv, ctx); |
213 | /* update -- might need P2P now */ | ||
214 | iwl_update_bcast_station(priv, ctx); | ||
213 | iwl_restore_stations(priv, ctx); | 215 | iwl_restore_stations(priv, ctx); |
214 | ret = iwl_restore_default_wep_keys(priv, ctx); | 216 | ret = iwl_restore_default_wep_keys(priv, ctx); |
215 | if (ret) { | 217 | if (ret) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 0bd722cee5ae..9b32f83f0b7f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "iwl-agn.h" | 35 | #include "iwl-agn.h" |
36 | 36 | ||
37 | static struct iwl_link_quality_cmd * | 37 | static struct iwl_link_quality_cmd * |
38 | iwl_sta_alloc_lq(struct iwl_priv *priv, u8 sta_id) | 38 | iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, u8 sta_id) |
39 | { | 39 | { |
40 | int i, r; | 40 | int i, r; |
41 | struct iwl_link_quality_cmd *link_cmd; | 41 | struct iwl_link_quality_cmd *link_cmd; |
@@ -47,10 +47,15 @@ iwl_sta_alloc_lq(struct iwl_priv *priv, u8 sta_id) | |||
47 | IWL_ERR(priv, "Unable to allocate memory for LQ cmd.\n"); | 47 | IWL_ERR(priv, "Unable to allocate memory for LQ cmd.\n"); |
48 | return NULL; | 48 | return NULL; |
49 | } | 49 | } |
50 | |||
51 | lockdep_assert_held(&priv->mutex); | ||
52 | |||
50 | /* Set up the rate scaling to start at selected rate, fall back | 53 | /* Set up the rate scaling to start at selected rate, fall back |
51 | * all the way down to 1M in IEEE order, and then spin on 1M */ | 54 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
52 | if (priv->band == IEEE80211_BAND_5GHZ) | 55 | if (priv->band == IEEE80211_BAND_5GHZ) |
53 | r = IWL_RATE_6M_INDEX; | 56 | r = IWL_RATE_6M_INDEX; |
57 | else if (ctx && ctx->vif && ctx->vif->p2p) | ||
58 | r = IWL_RATE_6M_INDEX; | ||
54 | else | 59 | else |
55 | r = IWL_RATE_1M_INDEX; | 60 | r = IWL_RATE_1M_INDEX; |
56 | 61 | ||
@@ -115,7 +120,7 @@ int iwlagn_add_bssid_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx | |||
115 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 120 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
116 | 121 | ||
117 | /* Set up default rate scaling table in device's station table */ | 122 | /* Set up default rate scaling table in device's station table */ |
118 | link_cmd = iwl_sta_alloc_lq(priv, sta_id); | 123 | link_cmd = iwl_sta_alloc_lq(priv, ctx, sta_id); |
119 | if (!link_cmd) { | 124 | if (!link_cmd) { |
120 | IWL_ERR(priv, "Unable to initialize rate scaling for station %pM.\n", | 125 | IWL_ERR(priv, "Unable to initialize rate scaling for station %pM.\n", |
121 | addr); | 126 | addr); |
@@ -554,7 +559,7 @@ int iwlagn_alloc_bcast_station(struct iwl_priv *priv, | |||
554 | priv->stations[sta_id].used |= IWL_STA_BCAST; | 559 | priv->stations[sta_id].used |= IWL_STA_BCAST; |
555 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 560 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
556 | 561 | ||
557 | link_cmd = iwl_sta_alloc_lq(priv, sta_id); | 562 | link_cmd = iwl_sta_alloc_lq(priv, ctx, sta_id); |
558 | if (!link_cmd) { | 563 | if (!link_cmd) { |
559 | IWL_ERR(priv, | 564 | IWL_ERR(priv, |
560 | "Unable to initialize rate scaling for bcast station.\n"); | 565 | "Unable to initialize rate scaling for bcast station.\n"); |
@@ -574,14 +579,14 @@ int iwlagn_alloc_bcast_station(struct iwl_priv *priv, | |||
574 | * Only used by iwlagn. Placed here to have all bcast station management | 579 | * Only used by iwlagn. Placed here to have all bcast station management |
575 | * code together. | 580 | * code together. |
576 | */ | 581 | */ |
577 | static int iwl_update_bcast_station(struct iwl_priv *priv, | 582 | int iwl_update_bcast_station(struct iwl_priv *priv, |
578 | struct iwl_rxon_context *ctx) | 583 | struct iwl_rxon_context *ctx) |
579 | { | 584 | { |
580 | unsigned long flags; | 585 | unsigned long flags; |
581 | struct iwl_link_quality_cmd *link_cmd; | 586 | struct iwl_link_quality_cmd *link_cmd; |
582 | u8 sta_id = ctx->bcast_sta_id; | 587 | u8 sta_id = ctx->bcast_sta_id; |
583 | 588 | ||
584 | link_cmd = iwl_sta_alloc_lq(priv, sta_id); | 589 | link_cmd = iwl_sta_alloc_lq(priv, ctx, sta_id); |
585 | if (!link_cmd) { | 590 | if (!link_cmd) { |
586 | IWL_ERR(priv, "Unable to initialize rate scaling for bcast station.\n"); | 591 | IWL_ERR(priv, "Unable to initialize rate scaling for bcast station.\n"); |
587 | return -ENOMEM; | 592 | return -ENOMEM; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 6d5584ae5ebf..dcdf2259520f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -304,6 +304,8 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta, | |||
304 | int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, | 304 | int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, |
305 | int tid); | 305 | int tid); |
306 | void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt); | 306 | void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt); |
307 | int iwl_update_bcast_station(struct iwl_priv *priv, | ||
308 | struct iwl_rxon_context *ctx); | ||
307 | int iwl_update_bcast_stations(struct iwl_priv *priv); | 309 | int iwl_update_bcast_stations(struct iwl_priv *priv); |
308 | void iwlagn_mac_sta_notify(struct ieee80211_hw *hw, | 310 | void iwlagn_mac_sta_notify(struct ieee80211_hw *hw, |
309 | struct ieee80211_vif *vif, | 311 | struct ieee80211_vif *vif, |