mac80211: backport latest patches except for NVRAM support
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 317-brcmfmac-bump-highest-event-number-for-4339-firmware.patch
1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Thu, 20 Aug 2015 22:06:07 +0200
3 Subject: [PATCH] brcmfmac: bump highest event number for 4339 firmware
4
5 The event mask length is determined by the highest event number
6 that is specified in the driver. When this length is shorter than
7 firmware expects setting event mask will fail and device becomes
8 pretty useless. This issue was reported with bcm4339 firmware that
9 was recently released.
10
11 Reported-by: Pontus Fuchs <pontusf@broadcom.com>
12 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
13 Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
14 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
15 Reviewed-by: Pontus Fuchs <pontusf@broadcom.com>
16 Signed-off-by: Arend van Spriel <arend@broadcom.com>
17 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
18 ---
19
20 --- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
21 +++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h
22 @@ -85,7 +85,6 @@ struct brcmf_event;
23 BRCMF_ENUM_DEF(IF, 54) \
24 BRCMF_ENUM_DEF(P2P_DISC_LISTEN_COMPLETE, 55) \
25 BRCMF_ENUM_DEF(RSSI, 56) \
26 - BRCMF_ENUM_DEF(PFN_SCAN_COMPLETE, 57) \
27 BRCMF_ENUM_DEF(EXTLOG_MSG, 58) \
28 BRCMF_ENUM_DEF(ACTION_FRAME, 59) \
29 BRCMF_ENUM_DEF(ACTION_FRAME_COMPLETE, 60) \
30 @@ -103,8 +102,7 @@ struct brcmf_event;
31 BRCMF_ENUM_DEF(FIFO_CREDIT_MAP, 74) \
32 BRCMF_ENUM_DEF(ACTION_FRAME_RX, 75) \
33 BRCMF_ENUM_DEF(TDLS_PEER_EVENT, 92) \
34 - BRCMF_ENUM_DEF(BCMC_CREDIT_SUPPORT, 127) \
35 - BRCMF_ENUM_DEF(PSTA_PRIMARY_INTF_IND, 128)
36 + BRCMF_ENUM_DEF(BCMC_CREDIT_SUPPORT, 127)
37
38 #define BRCMF_ENUM_DEF(id, val) \
39 BRCMF_E_##id = (val),
40 @@ -112,7 +110,11 @@ struct brcmf_event;
41 /* firmware event codes sent by the dongle */
42 enum brcmf_fweh_event_code {
43 BRCMF_FWEH_EVENT_ENUM_DEFLIST
44 - BRCMF_E_LAST
45 + /* this determines event mask length which must match
46 + * minimum length check in device firmware so it is
47 + * hard-coded here.
48 + */
49 + BRCMF_E_LAST = 139
50 };
51 #undef BRCMF_ENUM_DEF
52