OpenCloudOS-Kernel/drivers/net/wireless/st/cw1200
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
..
Kconfig
Makefile
bh.c
bh.h
cw1200.h
cw1200_sdio.c drivers: add explicit interrupt.h includes 2017-03-30 11:05:34 -07:00
cw1200_spi.c wireless: cw1200: use __maybe_unused to hide pm functions_ 2016-03-08 12:32:52 +02:00
debug.c
debug.h
fwio.c
fwio.h
hwbus.h
hwio.c
hwio.h
main.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
pm.c
pm.h wireless: cw1200: use __maybe_unused to hide pm functions_ 2016-03-08 12:32:52 +02:00
queue.c
queue.h
scan.c mac80211: Add support for beacon report radio measurement 2016-07-06 14:53:19 +02:00
scan.h
sta.c mac80211: Pass new RSSI level in CQM RSSI notification 2017-02-08 10:43:04 +01:00
sta.h mac80211: pass block ack session timeout to to driver 2016-01-14 11:13:17 +01:00
txrx.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
txrx.h
wsm.c cw1200: fix bogus maybe-uninitialized warning 2016-11-17 08:47:58 +02:00
wsm.h