Search Linux Wireless

Re: [PATCH mac80211-next] ath10k: fix unhandled switch value warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Pedersen <thomas@xxxxxxxxxxxx> writes:

> Cited commit introduced the following warnings:
>
> drivers/net/wireless/ath/ath10k/mac.c: In function 'chan_to_phymode':
> drivers/net/wireless/ath/ath10k/mac.c:558:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_1' not handled in switch [-Wswitch]
>   558 |   switch (chandef->width) {
>       |   ^~~~~~
> drivers/net/wireless/ath/ath10k/mac.c:558:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_2' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:558:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_4' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:558:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_8' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:558:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_16' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:581:3: warning: enumeration
> value 'NL80211_CHAN_WIDTH_1' not handled in switch [-Wswitch]
>   581 |   switch (chandef->width) {
>       |   ^~~~~~
> drivers/net/wireless/ath/ath10k/mac.c:581:3: warning: enumeration value 'NL80211_CHAN_WIDTH_2' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:581:3: warning: enumeration value 'NL80211_CHAN_WIDTH_4' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:581:3: warning: enumeration value 'NL80211_CHAN_WIDTH_8' not handled in switch [-Wswitch]
> drivers/net/wireless/ath/ath10k/mac.c:581:3: warning: enumeration value 'NL80211_CHAN_WIDTH_16' not handled in switch [-Wswitch]
>
> Fix them by making the existing invalid channel width
> cases the default, as the introduced channel widths
> currently don't make sense in 2 or 5GHz either.
>
> Fixes: e5cb3d34a66d ("nl80211: S1G band and channel definitions")
> Signed-off-by: Thomas Pedersen <thomas@xxxxxxxxxxxx>

I assume Johannes takes this so:

Acked-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux