Use previously computed channel in cs_freq_params for Beacon frames
When CSA is started, hostapd_change_config_freq() computes the channel from the provided frequency. Use this stored channel to add CSA IE in Beacon frames, instead of recomputing the channel each time. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
dd124ee821
commit
9438e9c785
1 changed files with 2 additions and 8 deletions
|
@ -297,19 +297,13 @@ static u8 * hostapd_eid_wpa(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||||
|
|
||||||
static u8 * hostapd_eid_csa(struct hostapd_data *hapd, u8 *eid)
|
static u8 * hostapd_eid_csa(struct hostapd_data *hapd, u8 *eid)
|
||||||
{
|
{
|
||||||
u8 chan;
|
if (!hapd->cs_freq_params.channel)
|
||||||
|
|
||||||
if (!hapd->cs_freq_params.freq)
|
|
||||||
return eid;
|
|
||||||
|
|
||||||
if (ieee80211_freq_to_chan(hapd->cs_freq_params.freq, &chan) ==
|
|
||||||
NUM_HOSTAPD_MODES)
|
|
||||||
return eid;
|
return eid;
|
||||||
|
|
||||||
*eid++ = WLAN_EID_CHANNEL_SWITCH;
|
*eid++ = WLAN_EID_CHANNEL_SWITCH;
|
||||||
*eid++ = 3;
|
*eid++ = 3;
|
||||||
*eid++ = hapd->cs_block_tx;
|
*eid++ = hapd->cs_block_tx;
|
||||||
*eid++ = chan;
|
*eid++ = hapd->cs_freq_params.channel;
|
||||||
*eid++ = hapd->cs_count;
|
*eid++ = hapd->cs_count;
|
||||||
|
|
||||||
return eid;
|
return eid;
|
||||||
|
|
Loading…
Reference in a new issue