From d22e8aabd3a3cb6faffd8cf39bb7ff7f9befdea3 Mon Sep 17 00:00:00 2001 From: AnjaneeDevi Kapparapu Date: Mon, 26 Jan 2015 18:54:45 -0800 Subject: qca-cld:hdd: Update channel info set by hostapd In case of 5G OBSS, hostapd may switch primary and secondary channel, driver needs to update its channels accordingly when set by hostapd during SAP start. Change-Id: Iee77ed4dc4c201b2b4fd353451bb7ff3a6464d4f CRs-fixed: 786915 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index f1d1d2186de9..5f841c908cc4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -6592,6 +6592,8 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device smeConfig.csrConfig.channelBondingMode24GHz = 0; else smeConfig.csrConfig.channelBondingMode5GHz = 0; + + (WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->secondaryChannel = 0; break; case NL80211_CHAN_HT40MINUS: @@ -6604,6 +6606,9 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device else smeConfig.csrConfig.channelBondingMode5GHz = eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY; + + (WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->secondaryChannel = + channel - 4; break; case NL80211_CHAN_HT40PLUS: sme_SetPhyCBMode24G(pHddCtx->hHal, @@ -6616,6 +6621,8 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device smeConfig.csrConfig.channelBondingMode5GHz = eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY; + (WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->secondaryChannel = + channel + 4; break; default: hddLog(VOS_TRACE_LEVEL_ERROR, -- cgit v1.2.3