libwifi: mac80211: fill radio extch
Ubus call:
ubus call wifi.radio.phy1 status
shows always "channel_ext": "none" even channel
is set to HT40. Fix is to fill-in radio extch field
based on radio current bw and for BW40 below/above
is decided based on interface operating frequency
and center1 frequency.
Signed-off-by: Marek Puzyniak marek.puzyniak@iopsys.eu
before:
root@en7562-002194715de0:~# ubus call wifi.radio.phy0 status | grep -B 3 channel_ext
"opclass": 0,
"channel": 6,
"bandwidth": 40,
"channel_ext": "none",
root@en7562-002194715de0:~# ubus call wifi.radio.phy1 status | grep -B 3 channel_ext
"opclass": 116,
"channel": 36,
"bandwidth": 40,
"channel_ext": "none",
root@en7562-002194715de0:~# ubus call wifi.radio.phy1 status | grep -B 3 channel_ext
"opclass": 117,
"channel": 48,
"bandwidth": 40,
"channel_ext": "none",
after:
root@en7562-002194715de0:~# ubus call wifi.radio.phy0 status | grep -B 3 channel_ext
"opclass": 83,
"channel": 6,
"bandwidth": 40,
"channel_ext": "above",
root@en7562-002194715de0:~# ubus call wifi.radio.phy0 status | grep -B 3 channel_ext
"opclass": 84,
"channel": 6,
"bandwidth": 40,
"channel_ext": "below",
root@en7562-002194715de0:~# ubus call wifi.radio.phy1 status | grep -B 3 channel_ext
"opclass": 116,
"channel": 36,
"bandwidth": 40,
"channel_ext": "above",
root@en7562-002194715de0:~# ubus call wifi.radio.phy1 status | grep -B 3 channel_ext
"opclass": 117,
"channel": 48,
"bandwidth": 40,
"channel_ext": "below",