diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2011-02-21 07:48:09 +0530 |
---|---|---|
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) priv->sta_slot |= (1 << sta_idx); priv->nstations++; - - /* - * Set chainmask etc. on the target. - */ - ret = ath9k_htc_update_cap_target(priv); - if (ret) - ath_dbg(common, ATH_DBG_CONFIG, - "Failed to update capability in target\n"); - priv->vif_sta_pos[priv->mon_vif_idx] = sta_idx; priv->ah->is_monitoring = true; @@ -1050,6 +1041,11 @@ static int ath9k_htc_start(struct ieee80211_hw *hw) ath9k_host_rx_init(priv); + ret = ath9k_htc_update_cap_target(priv); + if (ret) + ath_dbg(common, ATH_DBG_CONFIG, + "Failed to update capability in target\n"); + priv->op_flags &= ~OP_INVALID; htc_start(priv->htc); @@ -1182,11 +1178,6 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, if (ret) goto out; - ret = ath9k_htc_update_cap_target(priv); - if (ret) - ath_dbg(common, ATH_DBG_CONFIG, - "Failed to update capability in target\n"); - priv->ah->opmode = vif->type; priv->vif_slot |= (1 << avp->index); priv->vif = vif; |