linux_old1/drivers/net/wireless/realtek/rtl8xxxu
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 rtl8xxxu: Fix typo in Kconfig help text 2016-02-25 11:55:27 +02:00
Makefile rtl8xxxu: move rtl8188[cr] and rtl8192c related code into rtl8xxxu_8192c.c 2016-05-03 13:07:18 +03:00
rtl8xxxu.h rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00
rtl8xxxu_8192c.c rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00
rtl8xxxu_8192e.c rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00
rtl8xxxu_8723a.c rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00
rtl8xxxu_8723b.c rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00
rtl8xxxu_core.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
rtl8xxxu_regs.h rtl8xxxu: Update author/maintainer contact info 2017-01-20 11:49:01 +02:00