Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341450
b: refs/heads/master
c: 58109df
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Oct 24, 2012
1 parent 2f6e8cd commit a7eb9fc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f08dbda25f14d6b9c1ba131f65d0c32917733f6c
refs/heads/master: 58109df67aa073756eb5a2dc2ae068bc1bbcc125
12 changes: 9 additions & 3 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ static bool __ath6kl_cfg80211_sscan_stop(struct ath6kl_vif *vif)
return false;

del_timer_sync(&vif->sched_scan_timer);

if (ar->state == ATH6KL_STATE_RECOVERY)
return true;

ath6kl_wmi_enable_sched_scan_cmd(ar->wmi, vif->fw_vif_idx, false);

return true;
Expand Down Expand Up @@ -3435,8 +3439,9 @@ void ath6kl_cfg80211_stop(struct ath6kl_vif *vif)
break;
}

if (test_bit(CONNECTED, &vif->flags) ||
test_bit(CONNECT_PEND, &vif->flags))
if (vif->ar->state != ATH6KL_STATE_RECOVERY &&
(test_bit(CONNECTED, &vif->flags) ||
test_bit(CONNECT_PEND, &vif->flags)))
ath6kl_wmi_disconnect_cmd(vif->ar->wmi, vif->fw_vif_idx);

vif->sme_state = SME_DISCONNECTED;
Expand All @@ -3448,7 +3453,8 @@ void ath6kl_cfg80211_stop(struct ath6kl_vif *vif)
netif_carrier_off(vif->ndev);

/* disable scanning */
if (ath6kl_wmi_scanparams_cmd(vif->ar->wmi, vif->fw_vif_idx, 0xFFFF,
if (vif->ar->state != ATH6KL_STATE_RECOVERY &&
ath6kl_wmi_scanparams_cmd(vif->ar->wmi, vif->fw_vif_idx, 0xFFFF,
0, 0, 0, 0, 0, 0, 0, 0, 0) != 0)
ath6kl_warn("failed to disable scan during stop\n");

Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1697,10 +1697,14 @@ int ath6kl_init_hw_stop(struct ath6kl *ar)

void ath6kl_init_hw_restart(struct ath6kl *ar)
{
clear_bit(WMI_READY, &ar->flag);

ath6kl_cfg80211_stop_all(ar);

if (__ath6kl_init_hw_stop(ar))
if (__ath6kl_init_hw_stop(ar)) {
ath6kl_dbg(ATH6KL_DBG_RECOVERY, "Failed to stop during fw error recovery\n");
return;
}

if (__ath6kl_init_hw_start(ar)) {
ath6kl_dbg(ATH6KL_DBG_RECOVERY, "Failed to restart during fw error recovery\n");
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
int status = 0;
struct ath6kl_cookie *cookie = NULL;

if (WARN_ON_ONCE(ar->state == ATH6KL_STATE_WOW) ||
ar->state == ATH6KL_STATE_RECOVERY) {
if (WARN_ON_ONCE(ar->state == ATH6KL_STATE_WOW)) {
dev_kfree_skb(skb);
return -EACCES;
}
Expand Down

0 comments on commit a7eb9fc

Please sign in to comment.