aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11_ht.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2015-09-08 09:46:21 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-03 17:31:30 (GMT)
commit967791fe6002d3e6d27d70d9c92ea85ac8cd643d (patch)
tree9f67dcf3fb29f8389ad65665c227815d4a004f8a /src/ap/ieee802_11_ht.c
parent98b05081215dee5628d6568179899c3c20fb105e (diff)
downloadhostap-967791fe6002d3e6d27d70d9c92ea85ac8cd643d.zip
hostap-967791fe6002d3e6d27d70d9c92ea85ac8cd643d.tar.gz
hostap-967791fe6002d3e6d27d70d9c92ea85ac8cd643d.tar.bz2
Move HT CSA related IE function
Move Secondary Channel element function to ieee802_11_ht.c. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'src/ap/ieee802_11_ht.c')
-rw-r--r--src/ap/ieee802_11_ht.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 11fde2a..33c1f6c 100644
--- a/src/ap/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
@@ -108,6 +108,28 @@ u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid)
}
+u8 * hostapd_eid_secondary_channel(struct hostapd_data *hapd, u8 *eid)
+{
+ u8 sec_ch;
+
+ if (!hapd->cs_freq_params.sec_channel_offset)
+ return eid;
+
+ if (hapd->cs_freq_params.sec_channel_offset == -1)
+ sec_ch = HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW;
+ else if (hapd->cs_freq_params.sec_channel_offset == 1)
+ sec_ch = HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE;
+ else
+ return eid;
+
+ *eid++ = WLAN_EID_SECONDARY_CHANNEL_OFFSET;
+ *eid++ = 1;
+ *eid++ = sec_ch;
+
+ return eid;
+}
+
+
/*
op_mode
Set to 0 (HT pure) under the followign conditions