diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2011-02-20 21:18:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-23 16:25:26 -0500 |
commit | 1057b7503908e351b399caeeca38f9ef5fcc766c (patch) | |
tree | 50484234ef4fa0aedca50b290e63401ee4dbd30a /drivers/net/wireless/ath/ath9k | |
parent | a97b478c92c14255d375ed9ceb7a882083523593 (diff) |
ath9k_htc: Unify target capability updating
Update capabilites on the target once, when
start() is called, there is no need for redundant
updating on adding an interface.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 618670d318c5..4ced5cd6ef1c 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -318,15 +318,6 @@ static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv) | |||
318 | 318 | ||
319 | priv->sta_slot |= (1 << sta_idx); | 319 | priv->sta_slot |= (1 << sta_idx); |
320 | priv->nstations++; | 320 | priv->nstations++; |
321 | |||
322 | /* | ||
323 | * Set chainmask etc. on the target. | ||
324 | */ | ||
325 | ret = ath9k_htc_update_cap_target(priv); | ||
326 | if (ret) | ||
327 | ath_dbg(common, ATH_DBG_CONFIG, | ||
328 | "Failed to update capability in target\n"); | ||
329 | |||
330 | priv->vif_sta_pos[priv->mon_vif_idx] = sta_idx; | 321 | priv->vif_sta_pos[priv->mon_vif_idx] = sta_idx; |
331 | priv->ah->is_monitoring = true; | 322 | priv->ah->is_monitoring = true; |
332 | 323 | ||
@@ -1050,6 +1041,11 @@ static int ath9k_htc_start(struct ieee80211_hw *hw) | |||
1050 | 1041 | ||
1051 | ath9k_host_rx_init(priv); | 1042 | ath9k_host_rx_init(priv); |
1052 | 1043 | ||
1044 | ret = ath9k_htc_update_cap_target(priv); | ||
1045 | if (ret) | ||
1046 | ath_dbg(common, ATH_DBG_CONFIG, | ||
1047 | "Failed to update capability in target\n"); | ||
1048 | |||
1053 | priv->op_flags &= ~OP_INVALID; | 1049 | priv->op_flags &= ~OP_INVALID; |
1054 | htc_start(priv->htc); | 1050 | htc_start(priv->htc); |
1055 | 1051 | ||
@@ -1182,11 +1178,6 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, | |||
1182 | if (ret) | 1178 | if (ret) |
1183 | goto out; | 1179 | goto out; |
1184 | 1180 | ||
1185 | ret = ath9k_htc_update_cap_target(priv); | ||
1186 | if (ret) | ||
1187 | ath_dbg(common, ATH_DBG_CONFIG, | ||
1188 | "Failed to update capability in target\n"); | ||
1189 | |||
1190 | priv->ah->opmode = vif->type; | 1181 | priv->ah->opmode = vif->type; |
1191 | priv->vif_slot |= (1 << avp->index); | 1182 | priv->vif_slot |= (1 << avp->index); |
1192 | priv->vif = vif; | 1183 | priv->vif = vif; |