linux/drivers/net/wireless/ralink/rt2x00
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 rt2x00: add support for MT7620 2017-03-22 11:04:52 +02:00
Makefile
rt2x00.h rt2x00: reverse external PA capability flag logic 2017-04-13 17:12:32 +03:00
rt2x00config.c rt2x00: save conf settings before reset tuner 2017-01-17 13:58:36 +02:00
rt2x00crypto.c
rt2x00debug.c rt2x00: call entry directly in rt2x00_dump_frame 2017-02-08 17:30:19 +02:00
rt2x00debug.h
rt2x00dev.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
rt2x00dump.h
rt2x00firmware.c
rt2x00leds.c
rt2x00leds.h
rt2x00lib.h rt2x00: merge agc and vco works with link tuner 2016-12-30 13:34:20 +02:00
rt2x00link.c rt2x00: add mutex to synchronize config and link tuner 2016-12-30 14:03:41 +02:00
rt2x00mac.c rt2x00: do not flush empty queue 2017-01-17 13:58:38 +02:00
rt2x00mmio.c rt2800: increase TX timeout 2017-01-17 13:58:36 +02:00
rt2x00mmio.h
rt2x00pci.c rt2x00pci: Disable memory-write-invalidate when the driver exits 2016-01-07 11:22:46 +02:00
rt2x00pci.h
rt2x00queue.c rt2800: use TXOP_BACKOFF for probe frames 2017-03-08 17:05:53 +02:00
rt2x00queue.h mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
rt2x00reg.h
rt2x00soc.c rt2x00: fix clk_get call 2017-01-31 09:08:52 +02:00
rt2x00soc.h
rt2x00usb.c rt2x00usb: fix anchor initialization 2017-02-08 17:29:24 +02:00
rt2x00usb.h
rt61pci.c rt2x00: call entry directly in rt2x00_dump_frame 2017-02-08 17:30:19 +02:00
rt61pci.h net: wireless: rt2x00: Fixed Spacing issues 2016-02-07 09:10:05 +02:00
rt73usb.c rt2x00: call entry directly in rt2x00_dump_frame 2017-02-08 17:30:19 +02:00
rt73usb.h
rt2400pci.c rt2x00: call entry directly in rt2x00_dump_frame 2017-02-08 17:30:19 +02:00
rt2400pci.h
rt2500pci.c rt2x00: call entry directly in rt2x00_dump_frame 2017-02-08 17:30:19 +02:00
rt2500pci.h
rt2500usb.c rt2500usb: don't mark register accesses as inline 2017-02-15 11:16:00 +02:00
rt2500usb.h
rt2800.h rt2x00: add support for MT7620 2017-03-22 11:04:52 +02:00
rt2800lib.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
rt2800lib.h rt2x00: add support for MT7620 2017-03-22 11:04:52 +02:00
rt2800mmio.c rt2x00: use txdone_nomatch on rt2800usb 2017-03-08 17:05:52 +02:00
rt2800mmio.h
rt2800pci.c
rt2800pci.h
rt2800soc.c
rt2800usb.c rt2x00: use txdone_nomatch on rt2800usb 2017-03-08 17:05:52 +02:00
rt2800usb.h