linux/drivers/net/wireless/ath/carl9170
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
..
carl9170.h carl9170: fix sending URBs with wrong type when using full-speed 2014-08-11 14:43:51 -04:00
cmd.c cfg80211: remove "channel" from survey names 2015-01-08 15:27:52 +01:00
cmd.h
debug.c carl9170: fix debugfs crashes 2016-09-21 18:58:58 +02:00
debug.h
eeprom.h
fw.c mac80211: convert HW flags to unsigned long bitmap 2015-06-10 16:05:36 +02:00
fwcmd.h carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
fwdesc.h carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
hw.h carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
Kconfig carl9170: Clarify kconfig text 2016-06-04 17:58:14 +03:00
led.c mac80211: make LED trigger names const 2015-05-05 14:21:55 +02:00
mac.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
main.c wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers 2017-03-06 09:21:39 +01:00
Makefile
phy.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
phy.h
rx.c mac80211: separate encoding/bandwidth from flags 2017-04-28 10:41:45 +02:00
tx.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
usb.c carl9170: Fix wrong completion usage 2016-09-09 15:15:28 +03:00
version.h carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
wlan.h