aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAhmad Kholaif <akholaif@qca.qualcomm.com>2015-10-28 21:14:10 +0000
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-04-01 16:52:44 +0530
commit43d40481b5c752f56009c3bfd100e19606dd0a6a (patch)
tree3d6a33a8f52ab8245755d85af2a8b3bba8a605fd /src
parent087bb32b287508169d28cf5ea11d7344f1420571 (diff)
downloadandroid_external_wpa_supplicant_8-43d40481b5c752f56009c3bfd100e19606dd0a6a.tar.gz
android_external_wpa_supplicant_8-43d40481b5c752f56009c3bfd100e19606dd0a6a.tar.bz2
android_external_wpa_supplicant_8-43d40481b5c752f56009c3bfd100e19606dd0a6a.zip
nl80211: Add VHT 160 MHz channel flags
This extends the previous design that covered only the VHT 80 MHz cases for VHT channel flags. New functions are introduced to allow 160 MHz bandwidth cases to determine the center channel and check availability of a 160 MHz channel. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: bee5d8e067a743986c0a5c19b09dc61178436d27 Git-repo : git://w1.fi/srv/git/hostap.git Change-Id: I6e009a6886dfa1984ef76a188a5fd473accf2740 CRs-Fixed: 944221
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver.h9
-rw-r--r--src/drivers/driver_nl80211_capa.c30
2 files changed, 37 insertions, 2 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index b2df1a73..fe17f582 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -45,6 +45,15 @@
#define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
#define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
+#define HOSTAPD_CHAN_VHT_10_150 0x00100000
+#define HOSTAPD_CHAN_VHT_30_130 0x00200000
+#define HOSTAPD_CHAN_VHT_50_110 0x00400000
+#define HOSTAPD_CHAN_VHT_70_90 0x00800000
+#define HOSTAPD_CHAN_VHT_90_70 0x01000000
+#define HOSTAPD_CHAN_VHT_110_50 0x02000000
+#define HOSTAPD_CHAN_VHT_130_30 0x04000000
+#define HOSTAPD_CHAN_VHT_150_10 0x08000000
+
/**
* enum reg_change_initiator - Regulatory change initiator
*/
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 7b0e81d9..7b23a8a9 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1398,7 +1398,7 @@ static void nl80211_reg_rule_sec(struct nlattr *tb[],
static void nl80211_set_vht_mode(struct hostapd_hw_modes *mode, int start,
- int end)
+ int end, int max_bw)
{
int c;
@@ -1415,6 +1415,32 @@ static void nl80211_set_vht_mode(struct hostapd_hw_modes *mode, int start,
if (chan->freq - 70 >= start && chan->freq + 10 <= end)
chan->flag |= HOSTAPD_CHAN_VHT_70_10;
+
+ if (max_bw >= 160) {
+ if (chan->freq - 10 >= start && chan->freq + 150 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_10_150;
+
+ if (chan->freq - 30 >= start && chan->freq + 130 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_30_130;
+
+ if (chan->freq - 50 >= start && chan->freq + 110 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_50_110;
+
+ if (chan->freq - 70 >= start && chan->freq + 90 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_70_90;
+
+ if (chan->freq - 90 >= start && chan->freq + 70 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_90_70;
+
+ if (chan->freq - 110 >= start && chan->freq + 50 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_110_50;
+
+ if (chan->freq - 130 >= start && chan->freq + 30 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_130_30;
+
+ if (chan->freq - 150 >= start && chan->freq + 10 <= end)
+ chan->flag |= HOSTAPD_CHAN_VHT_150_10;
+ }
}
}
@@ -1445,7 +1471,7 @@ static void nl80211_reg_rule_vht(struct nlattr *tb[],
if (!results->modes[m].vht_capab)
continue;
- nl80211_set_vht_mode(&results->modes[m], start, end);
+ nl80211_set_vht_mode(&results->modes[m], start, end, max_bw);
}
}