diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-02-24 11:57:27 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-02-24 12:22:29 +0100 |
commit | 703515f889124248480f39d65f8704548cbf1c09 (patch) | |
tree | cd06f11ec2cc4e6ddb75c8982ecaab9882d3a9ed /package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch | |
parent | d27dd6298b0f9a66199758b32ce19c0932ef2ee0 (diff) | |
download | upstream-703515f889124248480f39d65f8704548cbf1c09.tar.gz upstream-703515f889124248480f39d65f8704548cbf1c09.tar.bz2 upstream-703515f889124248480f39d65f8704548cbf1c09.zip |
mac80211: sync with master branch as of 9edff13abd97
Includes the following changes:
9edff13abd mac80211: disable potentially harmful PS software retry for A-MPDU sessions
75216a76b0 mac80211: backport upstream fix for CSA in IBSS mode
368cc8ef47 mac80211: update brcmfmac backporting brcmf_err cleanups
66a63d25c4 mac80211: fix build on linux 3.18
9eacb9d7fc rt2x00: mt7620: lots of improvements
fd94fa61a7 mac80211: brcmfmac: update Raspberry Pi patches for linux 4.9
649e766a64 mac80211: update to wireless-testing 2017-01-31
47540afa5d ath9k: add a warning to the tx99 config option
b367eef21d mac80211: rt2x00: add support for external LNA on MT7620
9200e168f2 mac80211: move (& update) upstream accepted brcmfmac patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch')
-rw-r--r-- | package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch | 176 |
1 files changed, 0 insertions, 176 deletions
diff --git a/package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch b/package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch deleted file mode 100644 index f81523aa01..0000000000 --- a/package/kernel/mac80211/patches/357-0007-brcmfmac-split-up-brcmf_pno_config-function.patch +++ /dev/null @@ -1,176 +0,0 @@ -From fca6cb2f059e51dec3fcf3589a5abbbcce5b4043 Mon Sep 17 00:00:00 2001 -From: Arend Van Spriel <arend.vanspriel@broadcom.com> -Date: Wed, 23 Nov 2016 10:25:26 +0000 -Subject: [PATCH] brcmfmac: split up brcmf_pno_config() function - -The brcmf_pno_config() function handles two configurations in -firmware. Split it and have caller sort out what is needed. - -Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> -Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> -Reviewed-by: Franky Lin <franky.lin@broadcom.com> -Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> -Signed-off-by: Kalle Valo <kvalo@codeaurora.org> ---- - .../broadcom/brcm80211/brcmfmac/cfg80211.c | 11 +++- - .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 60 ++++++++++++++++------ - .../net/wireless/broadcom/brcm80211/brcmfmac/pno.h | 17 ++++-- - 3 files changed, 68 insertions(+), 20 deletions(-) - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -42,6 +42,7 @@ - #include "common.h" - - #define BRCMF_SCAN_IE_LEN_MAX 2048 -+#define BRCMF_SCHED_SCAN_PERIOD 30 - - #define WPA_OUI "\x00\x50\xF2" /* WPA OUI */ - #define WPA_OUI_TYPE 1 -@@ -3396,10 +3397,18 @@ brcmf_cfg80211_sched_scan_start(struct w - } - - /* configure pno */ -- ret = brcmf_pno_config(ifp, req); -+ ret = brcmf_pno_config(ifp, BRCMF_SCHED_SCAN_PERIOD, 0, 0); - if (ret < 0) - return ret; - -+ /* configure random mac */ -+ if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) { -+ ret = brcmf_pno_set_random(ifp, req->mac_addr, -+ req->mac_addr_mask); -+ if (ret < 0) -+ return ret; -+ } -+ - /* configure each match set */ - for (i = 0; i < req->n_match_sets; i++) { - ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c -@@ -23,10 +23,12 @@ - #include "fwil_types.h" - - #define BRCMF_PNO_VERSION 2 --#define BRCMF_PNO_TIME 30 - #define BRCMF_PNO_REPEAT 4 - #define BRCMF_PNO_FREQ_EXPO_MAX 3 -+#define BRCMF_PNO_IMMEDIATE_SCAN_BIT 3 -+#define BRCMF_PNO_ENABLE_BD_SCAN_BIT 5 - #define BRCMF_PNO_ENABLE_ADAPTSCAN_BIT 6 -+#define BRCMF_PNO_REPORT_SEPARATELY_BIT 11 - #define BRCMF_PNO_SCAN_INCOMPLETE 0 - #define BRCMF_PNO_WPA_AUTH_ANY 0xFFFFFFFF - #define BRCMF_PNO_HIDDEN_BIT 2 -@@ -47,42 +49,68 @@ int brcmf_pno_clean(struct brcmf_if *ifp - return ret; - } - --int brcmf_pno_config(struct brcmf_if *ifp, -- struct cfg80211_sched_scan_request *request) -+int brcmf_pno_config(struct brcmf_if *ifp, u32 scan_freq, -+ u32 mscan, u32 bestn) - { - struct brcmf_pno_param_le pfn_param; -- struct brcmf_pno_macaddr_le pfn_mac; -+ u16 flags; -+ u32 pfnmem; - s32 err; -- u8 *mac_mask; -- int i; - - memset(&pfn_param, 0, sizeof(pfn_param)); - pfn_param.version = cpu_to_le32(BRCMF_PNO_VERSION); - - /* set extra pno params */ -- pfn_param.flags = cpu_to_le16(1 << BRCMF_PNO_ENABLE_ADAPTSCAN_BIT); -+ flags = BIT(BRCMF_PNO_IMMEDIATE_SCAN_BIT) | -+ BIT(BRCMF_PNO_REPORT_SEPARATELY_BIT) | -+ BIT(BRCMF_PNO_ENABLE_ADAPTSCAN_BIT); - pfn_param.repeat = BRCMF_PNO_REPEAT; - pfn_param.exp = BRCMF_PNO_FREQ_EXPO_MAX; - - /* set up pno scan fr */ -- pfn_param.scan_freq = cpu_to_le32(BRCMF_PNO_TIME); -+ pfn_param.scan_freq = cpu_to_le32(scan_freq); -+ -+ if (mscan) { -+ pfnmem = bestn; - -+ /* set bestn in firmware */ -+ err = brcmf_fil_iovar_int_set(ifp, "pfnmem", pfnmem); -+ if (err < 0) { -+ brcmf_err("failed to set pfnmem\n"); -+ goto exit; -+ } -+ /* get max mscan which the firmware supports */ -+ err = brcmf_fil_iovar_int_get(ifp, "pfnmem", &pfnmem); -+ if (err < 0) { -+ brcmf_err("failed to get pfnmem\n"); -+ goto exit; -+ } -+ mscan = min_t(u32, mscan, pfnmem); -+ pfn_param.mscan = mscan; -+ pfn_param.bestn = bestn; -+ flags |= BIT(BRCMF_PNO_ENABLE_BD_SCAN_BIT); -+ brcmf_dbg(INFO, "mscan=%d, bestn=%d\n", mscan, bestn); -+ } -+ -+ pfn_param.flags = cpu_to_le16(flags); - err = brcmf_fil_iovar_data_set(ifp, "pfn_set", &pfn_param, - sizeof(pfn_param)); -- if (err) { -+ if (err) - brcmf_err("pfn_set failed, err=%d\n", err); -- return err; -- } - -- /* Find out if mac randomization should be turned on */ -- if (!(request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR)) -- return 0; -+exit: -+ return err; -+} -+ -+int brcmf_pno_set_random(struct brcmf_if *ifp, u8 *mac_addr, u8 *mac_mask) -+{ -+ struct brcmf_pno_macaddr_le pfn_mac; -+ int err, i; - - pfn_mac.version = BRCMF_PFN_MACADDR_CFG_VER; - pfn_mac.flags = BRCMF_PFN_MAC_OUI_ONLY | BRCMF_PFN_SET_MAC_UNASSOC; - -- memcpy(pfn_mac.mac, request->mac_addr, ETH_ALEN); -- mac_mask = request->mac_addr_mask; -+ memcpy(pfn_mac.mac, mac_addr, ETH_ALEN); - for (i = 0; i < ETH_ALEN; i++) { - pfn_mac.mac[i] &= mac_mask[i]; - pfn_mac.mac[i] |= get_random_int() & ~(mac_mask[i]); ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.h -@@ -30,10 +30,21 @@ int brcmf_pno_clean(struct brcmf_if *ifp - * brcmf_pno_config - configure pno parameters. - * - * @ifp: interface object used. -- * @request: scheduled scan parameters. -+ * @scan_freq: scan frequency period in seconds. -+ * @mscan: maximum number of scans stored in firmware. -+ * @bestn: maximum number of APs per scan stored in firmware. - */ --int brcmf_pno_config(struct brcmf_if *ifp, -- struct cfg80211_sched_scan_request *request); -+int brcmf_pno_config(struct brcmf_if *ifp, u32 scan_freq, -+ u32 mscan, u32 bestn); -+ -+/** -+ * brcmf_pno_set_random - setup randomisation mac address for pno. -+ * -+ * @ifp: interface object used. -+ * @mac_addr: MAC address used with randomisation. -+ * @mac_mask: MAC address mask used for randomisation. -+ */ -+int brcmf_pno_set_random(struct brcmf_if *ifp, u8 *mac_addr, u8 *mac_mask); - - /** - * brcmf_pno_add_ssid - add ssid for pno in firmware. |