DFS: Do not use cf1 to override freq for 20 MHz channels
NL80211_ATTR_CENTER_FREQ1 is defined to be used for anything but 20 MHz bandwidth, so it could be unset for 20 MHz channels. Do not use it to override center frequency from NL80211_ATTR_WIPHY_FREQ (if available) for 20 MHz channels to avoid clearing frequency. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0dfd2c61a5
commit
bb337ddac2
1 changed files with 4 additions and 2 deletions
|
@ -411,7 +411,8 @@ static int set_dfs_state(struct hostapd_iface *iface, int freq, int ht_enabled,
|
||||||
case CHAN_WIDTH_20_NOHT:
|
case CHAN_WIDTH_20_NOHT:
|
||||||
case CHAN_WIDTH_20:
|
case CHAN_WIDTH_20:
|
||||||
n_chans = 1;
|
n_chans = 1;
|
||||||
frequency = cf1;
|
if (frequency == 0)
|
||||||
|
frequency = cf1;
|
||||||
break;
|
break;
|
||||||
case CHAN_WIDTH_40:
|
case CHAN_WIDTH_40:
|
||||||
n_chans = 2;
|
n_chans = 2;
|
||||||
|
@ -466,7 +467,8 @@ static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
|
||||||
case CHAN_WIDTH_20_NOHT:
|
case CHAN_WIDTH_20_NOHT:
|
||||||
case CHAN_WIDTH_20:
|
case CHAN_WIDTH_20:
|
||||||
radar_n_chans = 1;
|
radar_n_chans = 1;
|
||||||
frequency = cf1;
|
if (frequency == 0)
|
||||||
|
frequency = cf1;
|
||||||
break;
|
break;
|
||||||
case CHAN_WIDTH_40:
|
case CHAN_WIDTH_40:
|
||||||
radar_n_chans = 2;
|
radar_n_chans = 2;
|
||||||
|
|
Loading…
Reference in a new issue