aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211
diff options
context:
space:
mode:
authorHante Meuleman <meuleman@broadcom.com>2012-09-11 15:18:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-12 14:19:15 -0400
commit35aafa9d6f977bff95c226d12435795086bc820d (patch)
treed3476294d854ca773ddb2632a7ea6f83b4fca883 /drivers/net/wireless/brcm80211
parentc6ab42948d7727e9efb2e29d9a0e68b88150f319 (diff)
brcmfmac: Clean up scan related code.
Clean up scan related code in preparation of a new scan mechanism (e-scan) which will follow in a separate patch. Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 4553fa07afe3..4a27ca03f5bc 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -490,8 +490,8 @@ static void brcmf_set_mpc(struct net_device *ndev, int mpc)
490 } 490 }
491} 491}
492 492
493static void wl_iscan_prep(struct brcmf_scan_params_le *params_le, 493static void brcmf_iscan_prep(struct brcmf_scan_params_le *params_le,
494 struct brcmf_ssid *ssid) 494 struct brcmf_ssid *ssid)
495{ 495{
496 memcpy(params_le->bssid, ether_bcast, ETH_ALEN); 496 memcpy(params_le->bssid, ether_bcast, ETH_ALEN);
497 params_le->bss_type = DOT11_BSSTYPE_ANY; 497 params_le->bss_type = DOT11_BSSTYPE_ANY;
@@ -545,7 +545,7 @@ brcmf_run_iscan(struct brcmf_cfg80211_iscan_ctrl *iscan,
545 return -ENOMEM; 545 return -ENOMEM;
546 BUG_ON(params_size >= BRCMF_DCMD_SMLEN); 546 BUG_ON(params_size >= BRCMF_DCMD_SMLEN);
547 547
548 wl_iscan_prep(&params->params_le, ssid); 548 brcmf_iscan_prep(&params->params_le, ssid);
549 549
550 params->version = cpu_to_le32(BRCMF_ISCAN_REQ_VERSION); 550 params->version = cpu_to_le32(BRCMF_ISCAN_REQ_VERSION);
551 params->action = cpu_to_le16(action); 551 params->action = cpu_to_le16(action);
@@ -598,9 +598,9 @@ static s32 brcmf_do_iscan(struct brcmf_cfg80211_priv *cfg_priv)
598} 598}
599 599
600static s32 600static s32
601__brcmf_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, 601brcmf_cfg80211_iscan(struct wiphy *wiphy, struct net_device *ndev,
602 struct cfg80211_scan_request *request, 602 struct cfg80211_scan_request *request,
603 struct cfg80211_ssid *this_ssid) 603 struct cfg80211_ssid *this_ssid)
604{ 604{
605 struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev); 605 struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev);
606 struct cfg80211_ssid *ssids; 606 struct cfg80211_ssid *ssids;
@@ -703,7 +703,7 @@ brcmf_cfg80211_scan(struct wiphy *wiphy,
703 if (!check_sys_up(wiphy)) 703 if (!check_sys_up(wiphy))
704 return -EIO; 704 return -EIO;
705 705
706 err = __brcmf_cfg80211_scan(wiphy, ndev, request, NULL); 706 err = brcmf_cfg80211_iscan(wiphy, ndev, request, NULL);
707 if (err) 707 if (err)
708 WL_ERR("scan error (%d)\n", err); 708 WL_ERR("scan error (%d)\n", err);
709 709
@@ -2547,10 +2547,8 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy,
2547 clear_bit(WL_STATUS_SCAN_ABORTING, &cfg_priv->status); 2547 clear_bit(WL_STATUS_SCAN_ABORTING, &cfg_priv->status);
2548 2548
2549 /* Turn off watchdog timer */ 2549 /* Turn off watchdog timer */
2550 if (test_bit(WL_STATUS_READY, &cfg_priv->status)) { 2550 if (test_bit(WL_STATUS_READY, &cfg_priv->status))
2551 WL_INFO("Enable MPC\n");
2552 brcmf_set_mpc(ndev, 1); 2551 brcmf_set_mpc(ndev, 1);
2553 }
2554 2552
2555 WL_TRACE("Exit\n"); 2553 WL_TRACE("Exit\n");
2556 2554
@@ -3194,10 +3192,8 @@ brcmf_notify_scan_status(struct brcmf_cfg80211_priv *cfg_priv,
3194 cfg_priv->scan_results->count = le32_to_cpu(bss_list_le->count); 3192 cfg_priv->scan_results->count = le32_to_cpu(bss_list_le->count);
3195 3193
3196 err = brcmf_inform_bss(cfg_priv); 3194 err = brcmf_inform_bss(cfg_priv);
3197 if (err) { 3195 if (err)
3198 scan_abort = true; 3196 scan_abort = true;
3199 goto scan_done_out;
3200 }
3201 3197
3202scan_done_out: 3198scan_done_out:
3203 if (cfg_priv->scan_request) { 3199 if (cfg_priv->scan_request) {