diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 17 |
1 files changed, 11 insertions, 6 deletions
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; |