From dda10c2afb8378747491ea5d329a1de635d6d58e Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Tue, 24 Mar 2015 16:05:01 -0700 Subject: Cumulative patch from commit c41d0840a1ae4d755c525b091a4bf9d740efdb5f c41d084 nl80211: Allow driver-based roam to change ESS 6ba7eba Add OpenSSL 0.9.8zf patch for EAP-FAST support 1de0710 atheros: Clear WPS appie during deinit 857d942 Extend offloaded ACS QCA vendor command to support VHT 0fd52a6 Remove duplicated wpa_s->conf->interworking check ad44309 Add Extended Capabilities element to all Probe Request frames 9bd566a Delay AP selection if all networks are temporarily disabled 701f396 Don't optimize scan frequencies if selected network has changed e9d2805 P2PS: Extend p2p_service_del asp to support 'all' parameter 6dd51ec P2PS: Add P2PS advertisements on ALL_SERVICES ANQP query c40a891 P2PS: Delete ASP advertisements on wpas_p2p_service_flush 2dc422e P2PS: Update SD indicator value on ASP add/del/update 030a3e1 DFS: Fix range availability check 56ef992 DFS: Consider non-contiguous channels 6ceea4c Restart sched_scan on channel list change e7a296b Remove unused shared_freq driver op 58e115b Fix hlr_auc_gw build with OpenSSL 5f9c92f nl80211: Fix vendor command handling 55e8f0e Fix CONFIG_EAP_UNAUTH_TLS without CONFIG_EAP_TLS build 9772af6 Interworking: Prevent scan during ANQP fetch and Interworking select 2c50246 Add a AP mode event message for possible PSK/passphrase mismatch 6784168 Remove SChannel support Change-Id: I21078309f83821d4b685de77c517c0886b3366bd Signed-off-by: Dmitry Shmidt --- src/common/hw_features_common.c | 57 ++++++++++++++++++++++++++++++----------- src/common/qca-vendor.h | 5 ++++ src/common/wpa_ctrl.h | 1 + 3 files changed, 48 insertions(+), 15 deletions(-) (limited to 'src/common') diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c index 309215e5..8d83de65 100644 --- a/src/common/hw_features_common.c +++ b/src/common/hw_features_common.c @@ -363,8 +363,6 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data, int vht_oper_chwidth, int center_segment0, int center_segment1, u32 vht_caps) { - int tmp; - os_memset(data, 0, sizeof(*data)); data->mode = mode; data->freq = freq; @@ -404,13 +402,34 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data, return -1; if (!sec_channel_offset) return -1; - /* primary 40 part must match the HT configuration */ - tmp = (30 + freq - 5000 - center_segment0 * 5) / 20; - tmp /= 2; - if (data->center_freq1 != 5000 + - center_segment0 * 5 - 20 + 40 * tmp) - return -1; - data->center_freq1 = 5000 + center_segment0 * 5; + if (!center_segment0) { + if (channel <= 48) + center_segment0 = 42; + else if (channel <= 64) + center_segment0 = 58; + else if (channel <= 112) + center_segment0 = 106; + else if (channel <= 128) + center_segment0 = 122; + else if (channel <= 144) + center_segment0 = 138; + else if (channel <= 161) + center_segment0 = 155; + data->center_freq1 = 5000 + center_segment0 * 5; + } else { + /* + * Note: HT/VHT config and params are coupled. Check if + * HT40 channel band is in VHT80 Pri channel band + * configuration. + */ + if (center_segment0 == channel + 6 || + center_segment0 == channel + 2 || + center_segment0 == channel - 2 || + center_segment0 == channel - 6) + data->center_freq1 = 5000 + center_segment0 * 5; + else + return -1; + } break; case VHT_CHANWIDTH_160MHZ: data->bandwidth = 160; @@ -424,13 +443,21 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data, return -1; if (!sec_channel_offset) return -1; - /* primary 40 part must match the HT configuration */ - tmp = (70 + freq - 5000 - center_segment0 * 5) / 20; - tmp /= 2; - if (data->center_freq1 != 5000 + - center_segment0 * 5 - 60 + 40 * tmp) + /* + * Note: HT/VHT config and params are coupled. Check if + * HT40 channel band is in VHT160 channel band configuration. + */ + if (center_segment0 == channel + 14 || + center_segment0 == channel + 10 || + center_segment0 == channel + 6 || + center_segment0 == channel + 2 || + center_segment0 == channel - 2 || + center_segment0 == channel - 6 || + center_segment0 == channel - 10 || + center_segment0 == channel - 14) + data->center_freq1 = 5000 + center_segment0 * 5; + else return -1; - data->center_freq1 = 5000 + center_segment0 * 5; break; } diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 2117ee70..5ff68178 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -195,6 +195,11 @@ enum qca_wlan_vendor_attr_acs_offload { QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE, QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED, QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED, + QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED, + QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH, + QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST, + QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL, + QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL, /* keep last */ QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_ACS_MAX = diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 1d19fc55..e3a816f2 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -227,6 +227,7 @@ extern "C" { #define WPS_EVENT_AP_PIN_DISABLED "WPS-AP-PIN-DISABLED " #define AP_STA_CONNECTED "AP-STA-CONNECTED " #define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED " +#define AP_STA_POSSIBLE_PSK_MISMATCH "AP-STA-POSSIBLE-PSK-MISMATCH " #define AP_REJECTED_MAX_STA "AP-REJECTED-MAX-STA " #define AP_REJECTED_BLOCKED_STA "AP-REJECTED-BLOCKED-STA " -- cgit v1.2.3