aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
diff options
context:
space:
mode:
authorDaniel Kim <dekim@broadcom.com>2014-06-21 06:11:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-06-25 15:32:48 -0400
commit5e787f7588ff69d3bcd546a64bf70e58a4e98fc5 (patch)
treeebeae94a5a6736809eee7536128c22206ef3c60a /drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
parent2bb443d9ade2d4557bffdb40447fdfbdadb6071c (diff)
brcmfmac: Don't control mpc setting during scan operation
Instead of controlling mpc setting during scan operation, initialize mpc setting and then let firmware take care of it. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Daniel Kim <dekim@broadcom.com> [arend@broadcom.com: keep mpc setting for bcm4329] 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/brcmfmac/wl_cfg80211.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 46b57eafa130..9682cf213ec4 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -590,6 +590,12 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
590 } 590 }
591} 591}
592 592
593static void brcmf_scan_config_mpc(struct brcmf_if *ifp, int mpc)
594{
595 if ((brcmf_get_chip_info(ifp) >> 4) == 0x4329)
596 brcmf_set_mpc(ifp, mpc);
597}
598
593void brcmf_set_mpc(struct brcmf_if *ifp, int mpc) 599void brcmf_set_mpc(struct brcmf_if *ifp, int mpc)
594{ 600{
595 s32 err = 0; 601 s32 err = 0;
@@ -643,7 +649,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
643 brcmf_err("Scan abort failed\n"); 649 brcmf_err("Scan abort failed\n");
644 } 650 }
645 651
646 brcmf_set_mpc(ifp, 1); 652 brcmf_scan_config_mpc(ifp, 1);
647 653
648 /* 654 /*
649 * e-scan can be initiated by scheduled scan 655 * e-scan can be initiated by scheduled scan
@@ -922,7 +928,7 @@ brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy,
922 brcmf_err("error (%d)\n", err); 928 brcmf_err("error (%d)\n", err);
923 return err; 929 return err;
924 } 930 }
925 brcmf_set_mpc(ifp, 0); 931 brcmf_scan_config_mpc(ifp, 0);
926 results = (struct brcmf_scan_results *)cfg->escan_info.escan_buf; 932 results = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
927 results->version = 0; 933 results->version = 0;
928 results->count = 0; 934 results->count = 0;
@@ -930,7 +936,7 @@ brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy,
930 936
931 err = escan->run(cfg, ifp, request, WL_ESCAN_ACTION_START); 937 err = escan->run(cfg, ifp, request, WL_ESCAN_ACTION_START);
932 if (err) 938 if (err)
933 brcmf_set_mpc(ifp, 1); 939 brcmf_scan_config_mpc(ifp, 1);
934 return err; 940 return err;
935} 941}
936 942
@@ -1021,7 +1027,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
1021 brcmf_err("WLC_SET_PASSIVE_SCAN error (%d)\n", err); 1027 brcmf_err("WLC_SET_PASSIVE_SCAN error (%d)\n", err);
1022 goto scan_out; 1028 goto scan_out;
1023 } 1029 }
1024 brcmf_set_mpc(ifp, 0); 1030 brcmf_scan_config_mpc(ifp, 0);
1025 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, 1031 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN,
1026 &sr->ssid_le, sizeof(sr->ssid_le)); 1032 &sr->ssid_le, sizeof(sr->ssid_le));
1027 if (err) { 1033 if (err) {
@@ -1031,7 +1037,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
1031 else 1037 else
1032 brcmf_err("WLC_SCAN error (%d)\n", err); 1038 brcmf_err("WLC_SCAN error (%d)\n", err);
1033 1039
1034 brcmf_set_mpc(ifp, 1); 1040 brcmf_scan_config_mpc(ifp, 1);
1035 goto scan_out; 1041 goto scan_out;
1036 } 1042 }
1037 } 1043 }