summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-06-15 22:59:06 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-15 22:59:06 -0700
commitc1f41f5290ecf992802ac043013fd55520d7e5ea (patch)
tree6e742acc797c8864d249240bb48cc01c48eccd37
parentc0301d4240c9f444741cfc6dd9bcd86c33a8a73d (diff)
parent5753a503cbdbfdfd2606dc725b50e893d80927c4 (diff)
Merge "ath10k: Send vdev down if association to bss fails"
-rw-r--r--drivers/net/wireless/ath/ath10k/core.h1
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 01d5ecc4f6b8..244f8d8bfbc2 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -958,6 +958,7 @@ struct ath10k {
struct fw_flag *fw_flags;
/* set for bmi chip sets */
bool is_bmi;
+ enum ieee80211_sta_state sta_state;
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
};
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b9d08b4b4cc5..03c7ae8a3924 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5924,6 +5924,9 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
new_state == IEEE80211_STA_NOTEXIST))
cancel_work_sync(&arsta->update_wk);
+ if (vif->type == NL80211_IFTYPE_STATION && new_state > ar->sta_state)
+ ar->sta_state = new_state;
+
mutex_lock(&ar->conf_mutex);
if (old_state == IEEE80211_STA_NOTEXIST &&
@@ -7392,8 +7395,9 @@ ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
ctx, arvif->vdev_id);
WARN_ON(!arvif->is_started);
-
- if (vif->type == NL80211_IFTYPE_MONITOR) {
+ if (vif->type == NL80211_IFTYPE_MONITOR ||
+ (vif->type == NL80211_IFTYPE_STATION &&
+ ar->sta_state < IEEE80211_STA_ASSOC)) {
WARN_ON(!arvif->is_up);
ret = ath10k_wmi_vdev_down(ar, arvif->vdev_id);
@@ -7409,6 +7413,7 @@ ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
ath10k_warn(ar, "failed to stop vdev %i: %d\n",
arvif->vdev_id, ret);
+ ar->sta_state = IEEE80211_STA_NOTEXIST;
arvif->is_started = false;
mutex_unlock(&ar->conf_mutex);