357-brcmfmac-make-scheduled-scan-support-conditional.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From: Arend van Spriel <[email protected]>
  2. Date: Tue, 14 Apr 2015 20:10:27 +0200
  3. Subject: [PATCH] brcmfmac: make scheduled scan support conditional
  4. The scheduled scan support depends on firmware supporting the PNO
  5. feature. This feature is optional so add a feature flag for this
  6. in the driver and announce scheduled scan support accordingly.
  7. Reviewed-by: Hante Meuleman <[email protected]>
  8. Reviewed-by: Pieter-Paul Giesberts <[email protected]>
  9. Signed-off-by: Arend van Spriel <[email protected]>
  10. ---
  11. --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
  12. +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
  13. @@ -5782,7 +5782,8 @@ static int brcmf_setup_wiphy(struct wiph
  14. wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
  15. wiphy->mgmt_stypes = brcmf_txrx_stypes;
  16. wiphy->max_remain_on_channel_duration = 5000;
  17. - brcmf_wiphy_pno_params(wiphy);
  18. + if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO))
  19. + brcmf_wiphy_pno_params(wiphy);
  20. /* vendor commands/events support */
  21. wiphy->vendor_commands = brcmf_vendor_cmds;
  22. --- a/drivers/net/wireless/brcm80211/brcmfmac/feature.c
  23. +++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.c
  24. @@ -124,6 +124,7 @@ void brcmf_feat_attach(struct brcmf_pub
  25. struct brcmf_if *ifp = drvr->iflist[0];
  26. brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_MCHAN, "mchan");
  27. + brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
  28. if (drvr->bus_if->wowl_supported)
  29. brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
  30. if (drvr->bus_if->chip != BRCM_CC_43362_CHIP_ID)
  31. --- a/drivers/net/wireless/brcm80211/brcmfmac/feature.h
  32. +++ b/drivers/net/wireless/brcm80211/brcmfmac/feature.h
  33. @@ -21,11 +21,13 @@
  34. *
  35. * MBSS: multiple BSSID support (eg. guest network in AP mode).
  36. * MCHAN: multi-channel for concurrent P2P.
  37. + * PNO: preferred network offload.
  38. * WOWL: Wake-On-WLAN.
  39. */
  40. #define BRCMF_FEAT_LIST \
  41. BRCMF_FEAT_DEF(MBSS) \
  42. BRCMF_FEAT_DEF(MCHAN) \
  43. + BRCMF_FEAT_DEF(PNO) \
  44. BRCMF_FEAT_DEF(WOWL)
  45. /*
  46. * Quirks: