brcmfmac: make scheduled scan support conditional
authorArend van Spriel <arend@broadcom.com>
Tue, 14 Apr 2015 18:10:27 +0000 (20:10 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 9 May 2015 13:26:50 +0000 (16:26 +0300)
The scheduled scan support depends on firmware supporting the PNO
feature. This feature is optional so add a feature flag for this
in the driver and announce scheduled scan support accordingly.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/brcm80211/brcmfmac/feature.c
drivers/net/wireless/brcm80211/brcmfmac/feature.h

index 84d9ab1d4da7629e9dbaa8adc228703c8bc47d0b..6fe2b7564cbfc961829d71069801c9957414b437 100644 (file)
@@ -5783,7 +5783,8 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
                wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
        wiphy->mgmt_stypes = brcmf_txrx_stypes;
        wiphy->max_remain_on_channel_duration = 5000;
-       brcmf_wiphy_pno_params(wiphy);
+       if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO))
+               brcmf_wiphy_pno_params(wiphy);
 
        /* vendor commands/events support */
        wiphy->vendor_commands = brcmf_vendor_cmds;
index 7748a1ccf14fdf4a6b2864441e9b041da35558a6..2c5fad3a3aa22523e57dfb97d2d0110d7fbfe820 100644 (file)
@@ -124,6 +124,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
        struct brcmf_if *ifp = drvr->iflist[0];
 
        brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_MCHAN, "mchan");
+       brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
        if (drvr->bus_if->wowl_supported)
                brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
        if (drvr->bus_if->chip != BRCM_CC_43362_CHIP_ID)
index 4bf40ff327d6ecc279f02b85e673e2dc00a0f21e..546962525cd2a1a302bdf43667b894176fbf4a40 100644 (file)
  *
  * MBSS: multiple BSSID support (eg. guest network in AP mode).
  * MCHAN: multi-channel for concurrent P2P.
+ * PNO: preferred network offload.
  * WOWL: Wake-On-WLAN.
  */
 #define BRCMF_FEAT_LIST \
        BRCMF_FEAT_DEF(MBSS) \
        BRCMF_FEAT_DEF(MCHAN) \
+       BRCMF_FEAT_DEF(PNO) \
        BRCMF_FEAT_DEF(WOWL)
 /*
  * Quirks: