linux_old1/drivers/net/wireless/realtek/rtlwifi/rtl8192ce
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
..
Makefile Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
def.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
dm.c rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
dm.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
hw.c rtlwifi: Move items out of rtl_pci_priv and rtl_usb_priv 2017-02-08 17:24:42 +02:00
hw.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
led.c rtlwifi: Move items out of rtl_pci_priv and rtl_usb_priv 2017-02-08 17:24:42 +02:00
led.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
phy.c rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG 2016-12-30 15:54:26 +02:00
phy.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
reg.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
rf.c rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG 2016-12-30 15:54:26 +02:00
rf.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
sw.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-07 16:29:30 -05:00
sw.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
table.c rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
table.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00
trx.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
trx.h rtlwifi: rtl8192ce: Remove address of Free Software Foundation 2016-11-17 08:41:48 +02:00