Store entire CS freq_params and not only freq
When CSA flow starts, store the entire struct hostapd_freq_params and not only CS frequency as it was before. The additional freq_params are required to advertise CS supplementary IEs such as secondary channel, wide bandwidth CS, etc. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
13daed58c7
commit
8f4713c5c9
4 changed files with 8 additions and 6 deletions
|
@ -206,10 +206,10 @@ static u8 * hostapd_eid_csa(struct hostapd_data *hapd, u8 *eid)
|
||||||
{
|
{
|
||||||
u8 chan;
|
u8 chan;
|
||||||
|
|
||||||
if (!hapd->iface->cs_freq)
|
if (!hapd->iface->cs_freq_params.freq)
|
||||||
return eid;
|
return eid;
|
||||||
|
|
||||||
if (ieee80211_freq_to_chan(hapd->iface->cs_freq, &chan) ==
|
if (ieee80211_freq_to_chan(hapd->iface->cs_freq_params.freq, &chan) ==
|
||||||
NUM_HOSTAPD_MODES)
|
NUM_HOSTAPD_MODES)
|
||||||
return eid;
|
return eid;
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,8 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
|
||||||
hapd->iconf->vht_oper_centr_freq_seg0_idx = seg0_idx;
|
hapd->iconf->vht_oper_centr_freq_seg0_idx = seg0_idx;
|
||||||
hapd->iconf->vht_oper_centr_freq_seg1_idx = seg1_idx;
|
hapd->iconf->vht_oper_centr_freq_seg1_idx = seg1_idx;
|
||||||
|
|
||||||
if (hapd->iface->csa_in_progress && freq == hapd->iface->cs_freq) {
|
if (hapd->iface->csa_in_progress &&
|
||||||
|
freq == hapd->iface->cs_freq_params.freq) {
|
||||||
hostapd_cleanup_cs_params(hapd);
|
hostapd_cleanup_cs_params(hapd);
|
||||||
|
|
||||||
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_CSA_FINISHED "freq=%d",
|
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_CSA_FINISHED "freq=%d",
|
||||||
|
|
|
@ -2199,7 +2199,7 @@ static int hostapd_fill_csa_settings(struct hostapd_iface *iface,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* set channel switch parameters for csa ie */
|
/* set channel switch parameters for csa ie */
|
||||||
iface->cs_freq = settings->freq_params.freq;
|
iface->cs_freq_params = settings->freq_params;
|
||||||
iface->cs_count = settings->cs_count;
|
iface->cs_count = settings->cs_count;
|
||||||
iface->cs_block_tx = settings->block_tx;
|
iface->cs_block_tx = settings->block_tx;
|
||||||
|
|
||||||
|
@ -2218,7 +2218,8 @@ static int hostapd_fill_csa_settings(struct hostapd_iface *iface,
|
||||||
|
|
||||||
void hostapd_cleanup_cs_params(struct hostapd_data *hapd)
|
void hostapd_cleanup_cs_params(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
hapd->iface->cs_freq = 0;
|
os_memset(&hapd->iface->cs_freq_params, 0,
|
||||||
|
sizeof(hapd->iface->cs_freq_params));
|
||||||
hapd->iface->cs_count = 0;
|
hapd->iface->cs_count = 0;
|
||||||
hapd->iface->cs_block_tx = 0;
|
hapd->iface->cs_block_tx = 0;
|
||||||
hapd->iface->cs_c_off_beacon = 0;
|
hapd->iface->cs_c_off_beacon = 0;
|
||||||
|
|
|
@ -334,7 +334,7 @@ struct hostapd_iface {
|
||||||
s8 lowest_nf;
|
s8 lowest_nf;
|
||||||
|
|
||||||
/* channel switch parameters */
|
/* channel switch parameters */
|
||||||
int cs_freq;
|
struct hostapd_freq_params cs_freq_params;
|
||||||
u8 cs_count;
|
u8 cs_count;
|
||||||
int cs_block_tx;
|
int cs_block_tx;
|
||||||
unsigned int cs_c_off_beacon;
|
unsigned int cs_c_off_beacon;
|
||||||
|
|
Loading…
Reference in a new issue