OpenCloudOS-Kernel/drivers/net/wireless/broadcom/brcm80211/brcmsmac
Johannes Berg da6a4352e7 mac80211: separate encoding/bandwidth from flags
We currently use a lot of flags that are mutually incompatible,
separate this out into actual encoding and bandwidth enum values.

Much of this again done with spatch, with manual post-editing,
mostly to add the switch statements and get rid of the conversions.

@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_80MHZ
+status->bw = RATE_INFO_BW_80
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_40MHZ
+status->bw = RATE_INFO_BW_40
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_20MHZ
+status->bw = RATE_INFO_BW_20
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_160MHZ
+status->bw = RATE_INFO_BW_160
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_5MHZ
+status->bw = RATE_INFO_BW_5
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_10MHZ
+status->bw = RATE_INFO_BW_10

@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_VHT
+status->encoding = RX_ENC_VHT
@@
expression status;
@@
-status->enc_flags |= RX_ENC_FLAG_HT
+status->encoding = RX_ENC_HT
@@
expression status;
@@
-status.enc_flags |= RX_ENC_FLAG_VHT
+status.encoding = RX_ENC_VHT
@@
expression status;
@@
-status.enc_flags |= RX_ENC_FLAG_HT
+status.encoding = RX_ENC_HT

@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_HT)
+(status->encoding == RX_ENC_HT)
@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_VHT)
+(status->encoding == RX_ENC_VHT)

@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_5MHZ)
+(status->bw == RATE_INFO_BW_5)
@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_10MHZ)
+(status->bw == RATE_INFO_BW_10)
@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_40MHZ)
+(status->bw == RATE_INFO_BW_40)
@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_80MHZ)
+(status->bw == RATE_INFO_BW_80)
@@
expression status;
@@
-(status->enc_flags & RX_ENC_FLAG_160MHZ)
+(status->bw == RATE_INFO_BW_160)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-04-28 10:41:45 +02:00
..
phy brcmsmac: fix array out-of-bounds access in qm_log10 2016-11-25 11:56:34 +02:00
Makefile Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
aiutils.c
aiutils.h
ampdu.c
ampdu.h
antsel.c
antsel.h
brcms_trace_brcmsmac.h
brcms_trace_brcmsmac_msg.h
brcms_trace_brcmsmac_tx.h
brcms_trace_events.c
brcms_trace_events.h
channel.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
channel.h
d11.h
debug.c
debug.h
dma.c brcmsmac: Free packet if dma_mapping_error() fails in dma_rxfill 2016-07-19 21:14:20 +03:00
dma.h
led.c
led.h
mac80211_if.c wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
mac80211_if.h
main.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
main.h
phy_shim.c
phy_shim.h
pmu.c
pmu.h
pub.h
rate.c
rate.h
scb.h
stf.c brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get() 2016-07-19 21:14:20 +03:00
stf.h
types.h
ucode_loader.c
ucode_loader.h