BigW Consortium Gitlab

Commit c0f9abbd by Zahid Chowdhury

Allow power control during scanning for the wp7xx

parent 836844f9
...@@ -1108,7 +1108,11 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request) ...@@ -1108,7 +1108,11 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request)
err = escan->run(cfg, ifp, request); err = escan->run(cfg, ifp, request);
if (err) if (err)
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
#if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
brcmf_scan_config_mpc(ifp, 0); brcmf_scan_config_mpc(ifp, 0);
#else /* SWI WP7XX is fine with power control */
brcmf_scan_config_mpc(ifp, 1);
#endif /* WPX5XX */
return err; return err;
} }
...@@ -1206,7 +1210,11 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif, ...@@ -1206,7 +1210,11 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
brcmf_err("WLC_SCAN error (%d)\n", err); brcmf_err("WLC_SCAN error (%d)\n", err);
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
#if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
brcmf_scan_config_mpc(ifp, 0); brcmf_scan_config_mpc(ifp, 0);
#else /* SWI WP7XX is fine with power control */
brcmf_scan_config_mpc(ifp, 1);
#endif /* WPX5XX */
goto scan_out; goto scan_out;
} }
} }
...@@ -3820,7 +3828,12 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy, ...@@ -3820,7 +3828,12 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy,
} }
/* Configure MPC */ /* Configure MPC */
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
brcmf_set_mpc(ifp, 0); #if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
brcmf_scan_config_mpc(ifp, 0);
#else /* SWI WP7XX is fine with power control */
brcmf_scan_config_mpc(ifp, 1);
#endif /* WPX5XX */
} else { } else {
/* Configure WOWL parameters */ /* Configure WOWL parameters */
...@@ -4744,7 +4757,11 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, ...@@ -4744,7 +4757,11 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
exit: exit:
if ((err) && (!mbss)) { if ((err) && (!mbss)) {
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
brcmf_set_mpc(ifp, 0); #if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
brcmf_scan_config_mpc(ifp, 0);
#else /* SWI WP7XX is fine with power control */
brcmf_scan_config_mpc(ifp, 1);
#endif /* WPX5XX */
brcmf_configure_arp_nd_offload(ifp, true); brcmf_configure_arp_nd_offload(ifp, true);
} }
return err; return err;
...@@ -4802,8 +4819,12 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) ...@@ -4802,8 +4819,12 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
if (err < 0) if (err < 0)
brcmf_err("bss_enable config failed %d\n", err); brcmf_err("bss_enable config failed %d\n", err);
} }
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
brcmf_set_mpc(ifp, 0); #if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
brcmf_scan_config_mpc(ifp, 0);
#else /* SWI WP7XX is fine with power control */
brcmf_scan_config_mpc(ifp, 1);
#endif /* WPX5XX */
brcmf_configure_arp_nd_offload(ifp, true); brcmf_configure_arp_nd_offload(ifp, true);
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
brcmf_net_setcarrier(ifp, false); brcmf_net_setcarrier(ifp, false);
......
...@@ -331,7 +331,11 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) ...@@ -331,7 +331,11 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
/* set mpc */ /* set mpc */
/* SWI WP85 does not work with power control off for scanning */ /* SWI WP85 does not work with power control off for scanning */
#if defined(CONFIG_ARCH_MSM9615) /* For WPX5XX */
err = brcmf_fil_iovar_int_set(ifp, "mpc", 0); err = brcmf_fil_iovar_int_set(ifp, "mpc", 0);
#else /* SWI WP7XX is fine with power control */
err = brcmf_fil_iovar_int_set(ifp, "mpc", 1);
#endif /* WPX5XX */
if (err) { if (err) {
brcmf_err("failed setting mpc\n"); brcmf_err("failed setting mpc\n");
goto done; goto done;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment