wlan: Added the support for VHT Wider Bandwidth Channel Switch
Added the Parsing of Wider BandWidth Channel Switch IE in Action frame
as well as Beacons
Change-Id: Ie0667f25d5854fe5f22615b90d8be0dceb754d73
CRs-Fixed: 399036
diff --git a/CORE/MAC/src/include/dot11f.h b/CORE/MAC/src/include/dot11f.h
index 7fc072e..376153c 100644
--- a/CORE/MAC/src/include/dot11f.h
+++ b/CORE/MAC/src/include/dot11f.h
@@ -35,7 +35,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Fri Sep 7 17:45:43 2012 from the following file(s):
+ * Tue Sep 11 13:23:29 2012 from the following file(s):
*
* dot11f.frms
*
@@ -5597,6 +5597,33 @@
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
+// EID 194 (0xc2)
+typedef struct sDot11fIEWiderBWChanSwitchAnn {
+ tANI_U8 present;
+ tANI_U8 newChanWidth;
+ tANI_U8 newCenterChanFreq0;
+ tANI_U8 newCenterChanFreq1;
+} tDot11fIEWiderBWChanSwitchAnn;
+
+#define DOT11F_EID_WIDERBWCHANSWITCHANN ( 194 )
+
+// N.B. These #defines do *not* include the EID & length
+#define DOT11F_IE_WIDERBWCHANSWITCHANN_MIN_LEN ( 3 )
+
+#define DOT11F_IE_WIDERBWCHANSWITCHANN_MAX_LEN ( 3 )
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+tANI_U32 dot11fUnpackIeWiderBWChanSwitchAnn(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEWiderBWChanSwitchAnn*);
+
+tANI_U32 dot11fPackIeWiderBWChanSwitchAnn(tpAniSirGlobal, tDot11fIEWiderBWChanSwitchAnn*, tANI_U8*, tANI_U32, tANI_U32*);
+
+tANI_U32 dot11fGetPackedIEWiderBWChanSwitchAnn(tpAniSirGlobal, tDot11fIEWiderBWChanSwitchAnn*, tANI_U32*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
// EID 221 (0xdd) {OUI 0x00, 0x50, 0xf2, 0x04} (Multi-IE)
typedef struct sDot11fIEWscAssocReq {
tANI_U8 present;
@@ -6087,51 +6114,52 @@
#endif /* C++ */
typedef struct sDot11fBeacon{
- tDot11fFfTimeStamp TimeStamp;
- tDot11fFfBeaconInterval BeaconInterval;
- tDot11fFfCapabilities Capabilities;
- tDot11fIESSID SSID;
- tDot11fIESuppRates SuppRates;
- tDot11fIEFHParamSet FHParamSet;
- tDot11fIEDSParams DSParams;
- tDot11fIECFParams CFParams;
- tDot11fIEIBSSParams IBSSParams;
- tDot11fIETIM TIM;
- tDot11fIECountry Country;
- tDot11fIEFHParams FHParams;
- tDot11fIEFHPattTable FHPattTable;
- tDot11fIEPowerConstraints PowerConstraints;
- tDot11fIEChanSwitchAnn ChanSwitchAnn;
- tDot11fIEQuiet Quiet;
- tDot11fIETPCReport TPCReport;
- tDot11fIEERPInfo ERPInfo;
- tDot11fIEExtSuppRates ExtSuppRates;
- tDot11fIERSN RSN;
- tDot11fIEQBSSLoad QBSSLoad;
- tDot11fIEEDCAParamSet EDCAParamSet;
- tDot11fIEQOSCapsAp QOSCapsAp;
- tDot11fIEAPChannelReport APChannelReport;
- tDot11fIERRMEnabledCap RRMEnabledCap;
- tDot11fIEMobilityDomain MobilityDomain;
- tDot11fIEWPA WPA;
- tDot11fIEHTCaps HTCaps;
- tDot11fIEHTInfo HTInfo;
- tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
- tDot11fIEWMMInfoAp WMMInfoAp;
- tDot11fIEWMMParams WMMParams;
- tDot11fIEWMMCaps WMMCaps;
- tDot11fIEWAPI WAPI;
- tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
- tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
- tDot11fIECCXTxmitPower CCXTxmitPower;
- tDot11fIEAirgo Airgo;
- tDot11fIEWscBeacon WscBeacon;
- tDot11fIEP2PBeacon P2PBeacon;
- tDot11fIEVHTCaps VHTCaps;
- tDot11fIEVHTOperation VHTOperation;
- tDot11fIEVHTExtBssLoad VHTExtBssLoad;
- tDot11fIEExtCap ExtCap;
- tDot11fIEOperatingMode OperatingMode;
+ tDot11fFfTimeStamp TimeStamp;
+ tDot11fFfBeaconInterval BeaconInterval;
+ tDot11fFfCapabilities Capabilities;
+ tDot11fIESSID SSID;
+ tDot11fIESuppRates SuppRates;
+ tDot11fIEFHParamSet FHParamSet;
+ tDot11fIEDSParams DSParams;
+ tDot11fIECFParams CFParams;
+ tDot11fIEIBSSParams IBSSParams;
+ tDot11fIETIM TIM;
+ tDot11fIECountry Country;
+ tDot11fIEFHParams FHParams;
+ tDot11fIEFHPattTable FHPattTable;
+ tDot11fIEPowerConstraints PowerConstraints;
+ tDot11fIEChanSwitchAnn ChanSwitchAnn;
+ tDot11fIEQuiet Quiet;
+ tDot11fIETPCReport TPCReport;
+ tDot11fIEERPInfo ERPInfo;
+ tDot11fIEExtSuppRates ExtSuppRates;
+ tDot11fIERSN RSN;
+ tDot11fIEQBSSLoad QBSSLoad;
+ tDot11fIEEDCAParamSet EDCAParamSet;
+ tDot11fIEQOSCapsAp QOSCapsAp;
+ tDot11fIEAPChannelReport APChannelReport;
+ tDot11fIERRMEnabledCap RRMEnabledCap;
+ tDot11fIEMobilityDomain MobilityDomain;
+ tDot11fIEWPA WPA;
+ tDot11fIEHTCaps HTCaps;
+ tDot11fIEHTInfo HTInfo;
+ tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
+ tDot11fIEWMMInfoAp WMMInfoAp;
+ tDot11fIEWMMParams WMMParams;
+ tDot11fIEWMMCaps WMMCaps;
+ tDot11fIEWAPI WAPI;
+ tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
+ tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
+ tDot11fIECCXTxmitPower CCXTxmitPower;
+ tDot11fIEAirgo Airgo;
+ tDot11fIEWscBeacon WscBeacon;
+ tDot11fIEP2PBeacon P2PBeacon;
+ tDot11fIEVHTCaps VHTCaps;
+ tDot11fIEVHTOperation VHTOperation;
+ tDot11fIEVHTExtBssLoad VHTExtBssLoad;
+ tDot11fIEExtCap ExtCap;
+ tDot11fIEOperatingMode OperatingMode;
+ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
} tDot11fBeacon;
#define DOT11F_BEACON ( 8 )
@@ -6173,37 +6201,38 @@
#endif /* C++ */
typedef struct sDot11fBeacon2{
- tDot11fIECountry Country;
- tDot11fIEPowerConstraints PowerConstraints;
- tDot11fIEChanSwitchAnn ChanSwitchAnn;
- tDot11fIEQuiet Quiet;
- tDot11fIETPCReport TPCReport;
- tDot11fIEERPInfo ERPInfo;
- tDot11fIEExtSuppRates ExtSuppRates;
- tDot11fIERSN RSN;
- tDot11fIEEDCAParamSet EDCAParamSet;
- tDot11fIEAPChannelReport APChannelReport;
- tDot11fIERRMEnabledCap RRMEnabledCap;
- tDot11fIEMobilityDomain MobilityDomain;
- tDot11fIEWPA WPA;
- tDot11fIEHTCaps HTCaps;
- tDot11fIEHTInfo HTInfo;
- tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
- tDot11fIEWMMInfoAp WMMInfoAp;
- tDot11fIEWMMParams WMMParams;
- tDot11fIEWMMCaps WMMCaps;
- tDot11fIEAirgo Airgo;
- tDot11fIEWscBeacon WscBeacon;
- tDot11fIEWAPI WAPI;
- tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
- tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
- tDot11fIECCXTxmitPower CCXTxmitPower;
- tDot11fIEP2PBeacon P2PBeacon;
- tDot11fIEVHTCaps VHTCaps;
- tDot11fIEVHTOperation VHTOperation;
- tDot11fIEVHTExtBssLoad VHTExtBssLoad;
- tDot11fIEExtCap ExtCap;
- tDot11fIEOperatingMode OperatingMode;
+ tDot11fIECountry Country;
+ tDot11fIEPowerConstraints PowerConstraints;
+ tDot11fIEChanSwitchAnn ChanSwitchAnn;
+ tDot11fIEQuiet Quiet;
+ tDot11fIETPCReport TPCReport;
+ tDot11fIEERPInfo ERPInfo;
+ tDot11fIEExtSuppRates ExtSuppRates;
+ tDot11fIERSN RSN;
+ tDot11fIEEDCAParamSet EDCAParamSet;
+ tDot11fIEAPChannelReport APChannelReport;
+ tDot11fIERRMEnabledCap RRMEnabledCap;
+ tDot11fIEMobilityDomain MobilityDomain;
+ tDot11fIEWPA WPA;
+ tDot11fIEHTCaps HTCaps;
+ tDot11fIEHTInfo HTInfo;
+ tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
+ tDot11fIEWMMInfoAp WMMInfoAp;
+ tDot11fIEWMMParams WMMParams;
+ tDot11fIEWMMCaps WMMCaps;
+ tDot11fIEAirgo Airgo;
+ tDot11fIEWscBeacon WscBeacon;
+ tDot11fIEWAPI WAPI;
+ tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
+ tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
+ tDot11fIECCXTxmitPower CCXTxmitPower;
+ tDot11fIEP2PBeacon P2PBeacon;
+ tDot11fIEVHTCaps VHTCaps;
+ tDot11fIEVHTOperation VHTOperation;
+ tDot11fIEVHTExtBssLoad VHTExtBssLoad;
+ tDot11fIEExtCap ExtCap;
+ tDot11fIEOperatingMode OperatingMode;
+ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
} tDot11fBeacon2;
#define DOT11F_BEACON2 ( 10 )
@@ -6221,49 +6250,50 @@
#endif /* C++ */
typedef struct sDot11fBeaconIEs{
- tDot11fIESSID SSID;
- tDot11fIESuppRates SuppRates;
- tDot11fIEFHParamSet FHParamSet;
- tDot11fIEDSParams DSParams;
- tDot11fIECFParams CFParams;
- tDot11fIEIBSSParams IBSSParams;
- tDot11fIETIM TIM;
- tDot11fIECountry Country;
- tDot11fIEFHParams FHParams;
- tDot11fIEFHPattTable FHPattTable;
- tDot11fIEPowerConstraints PowerConstraints;
- tDot11fIEChanSwitchAnn ChanSwitchAnn;
- tDot11fIEQuiet Quiet;
- tDot11fIETPCReport TPCReport;
- tDot11fIEERPInfo ERPInfo;
- tDot11fIEExtSuppRates ExtSuppRates;
- tDot11fIERSN RSN;
- tDot11fIEQBSSLoad QBSSLoad;
- tDot11fIEEDCAParamSet EDCAParamSet;
- tDot11fIEQOSCapsAp QOSCapsAp;
- tDot11fIEAPChannelReport APChannelReport;
- tDot11fIERRMEnabledCap RRMEnabledCap;
- tDot11fIEMobilityDomain MobilityDomain;
- tDot11fIEWPA WPA;
- tDot11fIEHTCaps HTCaps;
- tDot11fIEHTInfo HTInfo;
- tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
- tDot11fIEWMMInfoAp WMMInfoAp;
- tDot11fIEWMMParams WMMParams;
- tDot11fIEWMMCaps WMMCaps;
- tDot11fIEWAPI WAPI;
- tDot11fIECCXVersion CCXVersion;
- tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
- tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
- tDot11fIECCXTxmitPower CCXTxmitPower;
- tDot11fIEAirgo Airgo;
- tDot11fIEWscBeaconProbeRes WscBeaconProbeRes;
- tDot11fIEP2PBeaconProbeRes P2PBeaconProbeRes;
- tDot11fIEVHTCaps VHTCaps;
- tDot11fIEVHTOperation VHTOperation;
- tDot11fIEVHTExtBssLoad VHTExtBssLoad;
- tDot11fIEExtCap ExtCap;
- tDot11fIEOperatingMode OperatingMode;
+ tDot11fIESSID SSID;
+ tDot11fIESuppRates SuppRates;
+ tDot11fIEFHParamSet FHParamSet;
+ tDot11fIEDSParams DSParams;
+ tDot11fIECFParams CFParams;
+ tDot11fIEIBSSParams IBSSParams;
+ tDot11fIETIM TIM;
+ tDot11fIECountry Country;
+ tDot11fIEFHParams FHParams;
+ tDot11fIEFHPattTable FHPattTable;
+ tDot11fIEPowerConstraints PowerConstraints;
+ tDot11fIEChanSwitchAnn ChanSwitchAnn;
+ tDot11fIEQuiet Quiet;
+ tDot11fIETPCReport TPCReport;
+ tDot11fIEERPInfo ERPInfo;
+ tDot11fIEExtSuppRates ExtSuppRates;
+ tDot11fIERSN RSN;
+ tDot11fIEQBSSLoad QBSSLoad;
+ tDot11fIEEDCAParamSet EDCAParamSet;
+ tDot11fIEQOSCapsAp QOSCapsAp;
+ tDot11fIEAPChannelReport APChannelReport;
+ tDot11fIERRMEnabledCap RRMEnabledCap;
+ tDot11fIEMobilityDomain MobilityDomain;
+ tDot11fIEWPA WPA;
+ tDot11fIEHTCaps HTCaps;
+ tDot11fIEHTInfo HTInfo;
+ tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
+ tDot11fIEWMMInfoAp WMMInfoAp;
+ tDot11fIEWMMParams WMMParams;
+ tDot11fIEWMMCaps WMMCaps;
+ tDot11fIEWAPI WAPI;
+ tDot11fIECCXVersion CCXVersion;
+ tDot11fIECCXRadMgmtCap CCXRadMgmtCap;
+ tDot11fIECCXTrafStrmMet CCXTrafStrmMet;
+ tDot11fIECCXTxmitPower CCXTxmitPower;
+ tDot11fIEAirgo Airgo;
+ tDot11fIEWscBeaconProbeRes WscBeaconProbeRes;
+ tDot11fIEP2PBeaconProbeRes P2PBeaconProbeRes;
+ tDot11fIEVHTCaps VHTCaps;
+ tDot11fIEVHTOperation VHTOperation;
+ tDot11fIEVHTExtBssLoad VHTExtBssLoad;
+ tDot11fIEExtCap ExtCap;
+ tDot11fIEOperatingMode OperatingMode;
+ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
} tDot11fBeaconIEs;
#define DOT11F_BEACONIES ( 11 )
@@ -6281,10 +6311,11 @@
#endif /* C++ */
typedef struct sDot11fChannelSwitch{
- tDot11fFfCategory Category;
- tDot11fFfAction Action;
- tDot11fIEChanSwitchAnn ChanSwitchAnn;
- tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
+ tDot11fFfCategory Category;
+ tDot11fFfAction Action;
+ tDot11fIEChanSwitchAnn ChanSwitchAnn;
+ tDot11fIEExtChanSwitchAnn ExtChanSwitchAnn;
+ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
} tDot11fChannelSwitch;
#define DOT11F_CHANNELSWITCH ( 12 )
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index 3734887..6377fa9 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -129,6 +129,8 @@
tDot11fIEVHTOperation VHTOperation;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEOperatingMode OperatingMode;
+ tANI_U8 WiderBWChanSwitchAnnPresent;
+ tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
#endif
} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
@@ -881,4 +883,9 @@
tSirRetStatus
PopulateDot11fOperatingMode(tpAniSirGlobal pMac, tDot11fIEOperatingMode *pDot11f, tpPESession psessionEntry );
+
+void
+PopulateDot11fWiderBWChanSwitchAnn(tpAniSirGlobal pMac,
+ tDot11fIEWiderBWChanSwitchAnn *pDot11f,
+ tpPESession psessionEntry);
#endif
diff --git a/CORE/MAC/src/pe/include/limApi.h b/CORE/MAC/src/pe/include/limApi.h
index ef3ffba..bbd7357 100644
--- a/CORE/MAC/src/pe/include/limApi.h
+++ b/CORE/MAC/src/pe/include/limApi.h
@@ -189,7 +189,7 @@
/// creates a SM Power State Mode update request action frame and sends it out to staid
extern void limPostStartLearnModeMsgToSch(tpAniSirGlobal pMac);
#ifdef WLAN_FEATURE_11AC
-extern ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset );
+extern ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset, tANI_U8 CenterChan,tpPESession );
#endif
tANI_U8 limIsSystemInActiveState(tpAniSirGlobal pMac);
#if 0 /* Currently, this function is not used but keep it around for when we do need it */
diff --git a/CORE/MAC/src/pe/include/limGlobal.h b/CORE/MAC/src/pe/include/limGlobal.h
index 89b1865..c005670 100644
--- a/CORE/MAC/src/pe/include/limGlobal.h
+++ b/CORE/MAC/src/pe/include/limGlobal.h
@@ -655,6 +655,13 @@
tANI_U8 rxNSS: 3;
tANI_U8 rxNSSType: 1;
}tLimOperatingModeInfo, *tpLimOperatingModeInfo;
+
+typedef struct sLimWiderBWChannelSwitch
+{
+ tANI_U8 newChanWidth;
+ tANI_U8 newCenterChanFreq0;
+ tANI_U8 newCenterChanFreq1;
+}tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo;
#endif
// Enums used when stopping the Tx.
typedef enum eLimQuietTxMode
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index cfb4652..ca39bd8 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -303,6 +303,10 @@
tANI_U8 vhtCapability;
tANI_U8 vhtTxChannelWidthSet;
tLimOperatingModeInfo gLimOperatingMode;
+ tLimWiderBWChannelSwitchInfo gLimWiderBWChannelSwitch;
+ tANI_U8 vhtCapabilityPresentInBeacon;
+ tANI_U8 apCenterChan;
+ tANI_U8 apChanWidth;
#endif
tANI_U8 spectrumMgtEnabled;
/* *********************11H related*****************************/
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 41c364d..51060b6 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -2540,7 +2540,7 @@
}
#ifdef WLAN_FEATURE_11AC
pAddStaParams->vhtCapable = psessionEntry->vhtCapability;
- pAddStaParams->vhtTxChannelWidthSet = pMac->lim.apChanWidth;
+ pAddStaParams->vhtTxChannelWidthSet = psessionEntry->apChanWidth;
#endif
if(wlan_cfgGetInt(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) != eSIR_SUCCESS)
limLog(pMac, LOGP, FL("Couldn't get LISTEN_INTERVAL\n"));
@@ -3113,8 +3113,10 @@
pAddBssParams->vhtCapable = pAssocRsp->VHTCaps.present;
pAddBssParams->vhtTxChannelWidthSet = pAssocRsp->VHTOperation.chanWidth;
pAddBssParams->currentExtChannel = limGet11ACPhyCBState ( pMac,
- pAddBssParams->currentOperChannel,
- pAddBssParams->currentExtChannel );
+ pAddBssParams->currentOperChannel,
+ pAddBssParams->currentExtChannel,
+ psessionEntry->apCenterChan,
+ psessionEntry);
}
else
{
@@ -3403,9 +3405,11 @@
{
pAddBssParams->vhtCapable = pBeaconStruct->VHTCaps.present;
pAddBssParams->vhtTxChannelWidthSet = pBeaconStruct->VHTOperation.chanWidth;
- pAddBssParams->currentExtChannel = limGet11ACPhyCBState ( pMac,
- pAddBssParams->currentOperChannel,
- pAddBssParams->currentExtChannel );
+ pAddBssParams->currentExtChannel = limGet11ACPhyCBState ( pMac,
+ pAddBssParams->currentOperChannel,
+ pAddBssParams->currentExtChannel,
+ psessionEntry->apCenterChan,
+ psessionEntry);
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index b752858..8b8a1eb 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -661,7 +661,7 @@
limGetIElenFromBssDescription(pbssDescription),
&pftSessionEntry->limCurrentBssQosCaps,
&pftSessionEntry->limCurrentBssPropCap,
- ¤tBssUapsd , &localPowerConstraint);
+ ¤tBssUapsd , &localPowerConstraint, psessionEntry);
pftSessionEntry->limReassocBssQosCaps =
pftSessionEntry->limCurrentBssQosCaps;
diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c
index f82bce9..7d4adeb 100644
--- a/CORE/MAC/src/pe/lim/limLogDump.c
+++ b/CORE/MAC/src/pe/lim/limLogDump.c
@@ -2363,6 +2363,40 @@
return p;
}
+
+static char *
+dump_lim_vht_channel_switch_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p)
+{
+ tpPESession psessionEntry;
+ tANI_U8 nChanWidth = arg2;
+ tANI_U8 nNewChannel = arg3;
+ tANI_U8 ncbMode = arg4;
+ tANI_U8 peer[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+
+ if((psessionEntry = peFindSessionBySessionId(pMac,(tANI_U8)arg1) )== NULL)
+ {
+ p += log_sprintf( pMac,
+ p,"Session does not exist usage: 367 <0> sessionid channel \n");
+ printk("Session Not found!!!!\n");
+ return p;
+ }
+
+ limSendVHTChannelSwitchMgmtFrame( pMac, peer, nChanWidth, nNewChannel, (ncbMode+1), psessionEntry );
+
+ psessionEntry->gLimChannelSwitch.switchCount = 0;
+ psessionEntry->gLimSpecMgmt.dot11hChanSwState = eLIM_11H_CHANSW_RUNNING;
+ psessionEntry->gLimChannelSwitch.switchMode = 1;
+ psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel;
+ psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = nChanWidth;
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,(ncbMode+1),nChanWidth);
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = 0;
+
+ schSetFixedBeaconFields(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
+
+ return p;
+}
+
#endif
static char *
dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
@@ -2454,6 +2488,7 @@
{365, "PE.LIM: Cancel channel switch announcement", dump_lim_cancel_channel_switch_announcement},
#ifdef WLAN_FEATURE_11AC
{366, "PE.LIM: Send a VHT OPMode Action Frame", dump_lim_vht_opmode_notification},
+ {367, "PE.LIM: Send a VHT Channel Switch Announcement", dump_lim_vht_channel_switch_notification},
#endif
};
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index 540d7a3..1038ca3 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -278,7 +278,7 @@
limLog( pMac, LOGE,
FL( "Failed to unpack and parse an 11h-CHANSW Request (0x%08x, %d bytes):\n"),
nStatus,
- frameLen);
+ frameLen);
palFreeMemory(pMac->hHdd, pChannelSwitchFrame);
return;
}
@@ -313,6 +313,14 @@
psessionEntry->gLimChannelSwitch.switchTimeoutValue = SYS_MS_TO_TICKS(beaconPeriod) *
psessionEntry->gLimChannelSwitch.switchCount;
psessionEntry->gLimChannelSwitch.switchMode = pChannelSwitchFrame->ChanSwitchAnn.switchMode;
+#ifdef WLAN_FEATURE_11AC
+ if ( pChannelSwitchFrame->WiderBWChanSwitchAnn.present && psessionEntry->vhtCapability)
+ {
+ psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = pChannelSwitchFrame->WiderBWChanSwitchAnn.newChanWidth;
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = pChannelSwitchFrame->WiderBWChanSwitchAnn.newCenterChanFreq0;
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = pChannelSwitchFrame->WiderBWChanSwitchAnn.newCenterChanFreq1;
+ }
+#endif
PELOG3(limLog(pMac, LOG3, FL("Rcv Chnl Swtch Frame: Timeout in %d ticks\n"),
psessionEntry->gLimChannelSwitch.switchTimeoutValue);)
@@ -329,6 +337,24 @@
psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
psessionEntry->gLimChannelSwitch.secondarySubBand = pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset;
}
+#ifdef WLAN_FEATURE_11AC
+ if(psessionEntry->vhtCapability && pChannelSwitchFrame->WiderBWChanSwitchAnn.present)
+ {
+ if (pChannelSwitchFrame->WiderBWChanSwitchAnn.newChanWidth == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
+ {
+ if (pChannelSwitchFrame->ExtChanSwitchAnn.present && ((pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_LOW_PRIMARY) ||
+ (pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_HIGH_PRIMARY)))
+ {
+ psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
+ psessionEntry->gLimChannelSwitch.secondarySubBand = limGet11ACPhyCBState(pMac,
+ psessionEntry->gLimChannelSwitch.primaryChannel,
+ pChannelSwitchFrame->ExtChanSwitchAnn.secondaryChannelOffset,
+ pChannelSwitchFrame->WiderBWChanSwitchAnn.newCenterChanFreq0,
+ psessionEntry);
+ }
+ }
+ }
+#endif
}
}
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 0efe331..b11cf98 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -4462,11 +4462,11 @@
}
#ifdef WLAN_FEATURE_11AC
-ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset )
+ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset,tANI_U8 peerCenterChan, tpPESession psessionEntry)
{
ePhyChanBondState cbState = PHY_SINGLE_CHANNEL_CENTERED;
- if(!pMac->lim.apChanWidth)
+ if(!psessionEntry->apChanWidth)
{
return htSecondaryChannelOffset;
}
@@ -4475,31 +4475,31 @@
== PHY_DOUBLE_CHANNEL_LOW_PRIMARY)
)
{
- if ((channel + 2 ) == pMac->lim.apCenterChan )
+ if ((channel + 2 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
- else if ((channel + 6 ) == pMac->lim.apCenterChan )
+ else if ((channel + 6 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
- else if ((channel - 2 ) == pMac->lim.apCenterChan )
+ else if ((channel - 2 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
else
limLog (pMac, LOGP,
FL("Invalid Channel Number = %d Center Chan = %d \n"),
- channel, pMac->lim.apCenterChan);
+ channel, peerCenterChan);
}
if ( (htSecondaryChannelOffset
== PHY_DOUBLE_CHANNEL_HIGH_PRIMARY)
)
{
- if ((channel - 2 ) == pMac->lim.apCenterChan )
+ if ((channel - 2 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_CENTERED;
- else if ((channel + 2 ) == pMac->lim.apCenterChan )
+ else if ((channel + 2 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
- else if ((channel - 6 ) == pMac->lim.apCenterChan )
+ else if ((channel - 6 ) == peerCenterChan )
cbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
else
limLog (pMac, LOGP,
FL("Invalid Channel Number = %d Center Chan = %d \n"),
- channel, pMac->lim.apCenterChan);
+ channel, peerCenterChan);
}
return cbState;
}
@@ -4525,7 +4525,7 @@
#ifdef WLAN_FEATURE_11AC
if ( peSession->vhtCapability )
{
- limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset ), maxTxPower, peSessionId);
+ limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset,peSession->apCenterChan, peSession), maxTxPower, peSessionId);
}
else
#endif
@@ -4539,9 +4539,9 @@
}
// Send WDA_CHNL_SWITCH_IND to HAL
#ifdef WLAN_FEATURE_11AC
- if ( peSession->vhtCapability && pMac->lim.vhtCapabilityPresentInBeacon)
+ if ( peSession->vhtCapability && peSession->vhtCapabilityPresentInBeacon)
{
- limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset ), maxTxPower, peSessionId);
+ limSendSwitchChnlParams( pMac, channel, limGet11ACPhyCBState( pMac,channel,secChannelOffset,peSession->apCenterChan, peSession), maxTxPower, peSessionId);
}
else
#endif
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 7dab059..8e9088f 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1683,7 +1683,8 @@
&psessionEntry->limCurrentBssQosCaps,
&psessionEntry->limCurrentBssPropCap,
&pMac->lim.gLimCurrentBssUapsd //TBD-RAJESH make gLimCurrentBssUapsd this session specific
- , &localPowerConstraint
+ , &localPowerConstraint,
+ psessionEntry
);
#ifdef FEATURE_WLAN_CCX
psessionEntry->maxTxPower = limGetMaxTxPower(regMax, localPowerConstraint, pMac->roam.configParam.nTxPowerCap);
@@ -1947,7 +1948,8 @@
&psessionEntry->limReassocBssQosCaps,
&psessionEntry->limReassocBssPropCap,
&pMac->lim.gLimCurrentBssUapsd //TBD-RAJESH make gLimReassocBssUapsd session specific
- , &localPowerConstraint
+ , &localPowerConstraint,
+ psessionEntry
);
psessionEntry->maxTxPower = VOS_MIN( regMax , (localPowerConstraint) );
diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.c b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
index a990d00..dc3b2f0 100644
--- a/CORE/MAC/src/pe/lim/limPropExtsUtils.c
+++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
@@ -106,7 +106,8 @@
void
limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen,
tANI_U8 *qosCap, tANI_U16 *propCap, tANI_U8 *uapsd,
- tPowerdBm *localConstraint
+ tPowerdBm *localConstraint,
+ tpPESession psessionEntry
)
{
tSirProbeRespBeacon beaconStruct;
@@ -144,13 +145,13 @@
if ( beaconStruct.VHTCaps.present && beaconStruct.VHTOperation.present)
{
- pMac->lim.vhtCapabilityPresentInBeacon = 1;
- pMac->lim.apCenterChan = beaconStruct.VHTOperation.chanCenterFreqSeg1;
- pMac->lim.apChanWidth = beaconStruct.VHTOperation.chanWidth;
+ psessionEntry->vhtCapabilityPresentInBeacon = 1;
+ psessionEntry->apCenterChan = beaconStruct.VHTOperation.chanCenterFreqSeg1;
+ psessionEntry->apChanWidth = beaconStruct.VHTOperation.chanWidth;
}
else
{
- pMac->lim.vhtCapabilityPresentInBeacon = 0;
+ psessionEntry->vhtCapabilityPresentInBeacon = 0;
}
#endif
// Extract the UAPSD flag from WMM Parameter element
diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.h b/CORE/MAC/src/pe/lim/limPropExtsUtils.h
index 274294b..41ee914 100644
--- a/CORE/MAC/src/pe/lim/limPropExtsUtils.h
+++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.h
@@ -55,7 +55,7 @@
#endif
/// Function to extract AP's HCF capability from IE fields
-void limExtractApCapability(tpAniSirGlobal, tANI_U8 *, tANI_U16, tANI_U8 *, tANI_U16 *, tANI_U8 *, tPowerdBm*);
+void limExtractApCapability(tpAniSirGlobal, tANI_U8 *, tANI_U16, tANI_U8 *, tANI_U16 *, tANI_U8 *, tPowerdBm*, tpPESession);
#if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
/// Function to extract current Learn channel
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index ba42983..1c0789b 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -39,6 +39,7 @@
#include "limTypes.h"
#include "limUtils.h"
#include "limSecurityUtils.h"
+#include "limPropExtsUtils.h"
#include "dot11f.h"
#include "limStaHashApi.h"
#include "schApi.h"
@@ -2413,7 +2414,7 @@
}
#ifdef WLAN_FEATURE_11AC
if ( psessionEntry->vhtCapability &&
- pMac->lim.vhtCapabilityPresentInBeacon)
+ psessionEntry->vhtCapabilityPresentInBeacon)
{
limLog( pMac, LOGW, FL("Populate VHT IEs in Assoc Request\n"));
PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
@@ -3155,7 +3156,7 @@
}
#ifdef WLAN_FEATURE_11AC
if ( psessionEntry->vhtCapability &&
- pMac->lim.vhtCapabilityPresentInBeacon)
+ psessionEntry->vhtCapabilityPresentInBeacon)
{
limLog( pMac, LOGW, FL("Populate VHT IEs in Re-Assoc Request\n"));
PopulateDot11fVHTCaps( pMac, &frm.VHTCaps );
@@ -4506,6 +4507,147 @@
return eSIR_SUCCESS;
}
+
+/**
+ * \brief Send a VHT Channel Switch Announcement
+ *
+ *
+ * \param pMac Pointer to the global MAC datastructure
+ *
+ * \param peer MAC address to which this frame will be sent
+ *
+ * \param nChanWidth
+ *
+ * \param nNewChannel
+ *
+ *
+ * \return eSIR_SUCCESS on success, eSIR_FAILURE else
+ *
+ *
+ */
+
+tSirRetStatus
+limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,
+ tSirMacAddr peer,
+ tANI_U8 nChanWidth,
+ tANI_U8 nNewChannel,
+ tANI_U8 ncbMode,
+ tpPESession psessionEntry )
+{
+ tDot11fChannelSwitch frm;
+ tANI_U8 *pFrame;
+ tSirRetStatus nSirStatus;
+ tpSirMacMgmtHdr pMacHdr;
+ tANI_U32 nBytes, nPayload, nStatus;//, nCfg;
+ void *pPacket;
+ eHalStatus halstatus;
+ tANI_U8 txFlag = 0;
+
+ palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+
+
+ frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
+ frm.Action.action = SIR_MAC_ACTION_CHANNEL_SWITCH_ID;
+ frm.ChanSwitchAnn.switchMode = 1;
+ frm.ChanSwitchAnn.newChannel = nNewChannel;
+ frm.ChanSwitchAnn.switchCount = 1;
+ frm.ExtChanSwitchAnn.secondaryChannelOffset = limGetHTCBState(ncbMode);
+ frm.ExtChanSwitchAnn.present = 1;
+ frm.WiderBWChanSwitchAnn.newChanWidth = nChanWidth;
+ frm.WiderBWChanSwitchAnn.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,ncbMode,nChanWidth);
+ frm.WiderBWChanSwitchAnn.newCenterChanFreq1 = 0;
+ frm.ChanSwitchAnn.present = 1;
+ frm.WiderBWChanSwitchAnn.present = 1;
+
+ nStatus = dot11fGetPackedChannelSwitchSize( pMac, &frm, &nPayload );
+ if ( DOT11F_FAILED( nStatus ) )
+ {
+ limLog( pMac, LOGP, FL("Failed to calculate the packed size f"
+ "or a Channel Switch (0x%08x).\n"),
+ nStatus );
+ // We'll fall back on the worst case scenario:
+ nPayload = sizeof( tDot11fChannelSwitch );
+ }
+ else if ( DOT11F_WARNED( nStatus ) )
+ {
+ limLog( pMac, LOGW, FL("There were warnings while calculating"
+ "the packed size for a Channel Switch (0x"
+ "%08x).\n"), nStatus );
+ }
+
+ nBytes = nPayload + sizeof( tSirMacMgmtHdr );
+
+ halstatus = palPktAlloc( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( tANI_U16 )nBytes, ( void** ) &pFrame, ( void** ) &pPacket );
+ if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
+ {
+ limLog( pMac, LOGP, FL("Failed to allocate %d bytes for a TPC"
+ " Report.\n"), nBytes );
+ return eSIR_FAILURE;
+ }
+ // Paranoia:
+ palZeroMemory( pMac->hHdd, pFrame, nBytes );
+
+ // Next, we fill out the buffer descriptor:
+ nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
+ SIR_MAC_MGMT_ACTION, peer, psessionEntry->selfMacAddr);
+ pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
+ palCopyMemory( pMac->hHdd,
+ (tANI_U8 *) pMacHdr->bssId,
+ (tANI_U8 *) psessionEntry->bssId,
+ sizeof( tSirMacAddr ));
+ if ( eSIR_SUCCESS != nSirStatus )
+ {
+ limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
+ "tor for a Channel Switch (%d).\n"),
+ nSirStatus );
+ palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket );
+ return eSIR_FAILURE; // just allocated...
+ }
+ nStatus = dot11fPackChannelSwitch( pMac, &frm, pFrame +
+ sizeof(tSirMacMgmtHdr),
+ nPayload, &nPayload );
+ if ( DOT11F_FAILED( nStatus ) )
+ {
+ limLog( pMac, LOGE, FL("Failed to pack a Channel Switch (0x%08x).\n"),
+ nStatus );
+ palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket );
+ return eSIR_FAILURE; // allocated!
+ }
+ else if ( DOT11F_WARNED( nStatus ) )
+ {
+ limLog( pMac, LOGW, FL("There were warnings while packing a C"
+ "hannel Switch (0x%08x).\n") );
+ }
+
+ if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel))
+#ifdef WLAN_FEATURE_P2P
+ || ( psessionEntry->pePersona == VOS_P2P_CLIENT_MODE ) ||
+ ( psessionEntry->pePersona == VOS_P2P_GO_MODE)
+#endif
+ )
+ {
+ txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
+ }
+ halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
+ HAL_TXRX_FRM_802_11_MGMT,
+ ANI_TXDIR_TODS,
+ 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ limTxComplete, pFrame, txFlag );
+ if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
+ {
+ limLog( pMac, LOGE, FL("Failed to send a Channel Switch "
+ "(%X)!\n"),
+ nSirStatus );
+ //Pkt will be freed up by the callback
+ return eSIR_FAILURE;
+ }
+
+ return eSIR_SUCCESS;
+
+} // End limSendVHTChannelSwitchMgmtFrame.
+
+
+
#endif
/**
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.h b/CORE/MAC/src/pe/lim/limSendMessages.h
index 4bf8977..5f1e716 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.h
+++ b/CORE/MAC/src/pe/lim/limSendMessages.h
@@ -47,6 +47,11 @@
tSirRetStatus limSendModeUpdate(tpAniSirGlobal pMac,
tUpdateVHTOpMode *tempParam,
tpPESession psessionEntry );
+
+tANI_U32 limGetCenterChannel(tpAniSirGlobal pMac,
+ tANI_U8 primarychanNum,
+ ePhyChanBondState secondaryChanOffset,
+ tANI_U8 chanWidth);
#endif
#if defined WLAN_FEATURE_VOWIFI
tSirRetStatus limSendSwitchChnlParams(tpAniSirGlobal pMac, tANI_U8 chnlNumber,
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index f2e1330..31275f9 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -419,7 +419,9 @@
/*Get 11ac cbState from 11n cbState*/
htSecondaryChannelOffset = limGet11ACPhyCBState(pMac,
psessionEntry->currentOperChannel,
- psessionEntry->htSecondaryChannelOffset);
+ psessionEntry->htSecondaryChannelOffset,
+ psessionEntry->apCenterChan,
+ psessionEntry);
peSetResumeChannel( pMac, psessionEntry->currentOperChannel, htSecondaryChannelOffset);
}
else
diff --git a/CORE/MAC/src/pe/lim/limSessionUtils.c b/CORE/MAC/src/pe/lim/limSessionUtils.c
index e193ed9..5c9db50 100644
--- a/CORE/MAC/src/pe/lim/limSessionUtils.c
+++ b/CORE/MAC/src/pe/lim/limSessionUtils.c
@@ -278,7 +278,9 @@
/*Get 11ac cbState from 11n cbState*/
*resumePhyCbState = limGet11ACPhyCBState(pMac,
pMac->lim.gpSession[i].currentOperChannel,
- pMac->lim.gpSession[i].htSecondaryChannelOffset);
+ pMac->lim.gpSession[i].htSecondaryChannelOffset,
+ pMac->lim.gpSession[i].apCenterChan,
+ &pMac->lim.gpSession[i]);
}
#endif
}
diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h
index 7dc1965..4244e37 100644
--- a/CORE/MAC/src/pe/lim/limTypes.h
+++ b/CORE/MAC/src/pe/lim/limTypes.h
@@ -736,6 +736,7 @@
#ifdef WLAN_FEATURE_11AC
tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
+tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
#endif
#if defined WLAN_FEATURE_VOWIFI
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 859b379..8499365 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -2751,8 +2751,10 @@
tANI_U16 beaconPeriod;
tChannelSwitchPropIEStruct *pPropChnlSwitch;
tDot11fIEChanSwitchAnn *pChnlSwitch;
+#ifdef WLAN_FEATURE_11AC
+ tDot11fIEWiderBWChanSwitchAnn *pWiderChnlSwitch;
+#endif
-
beaconPeriod = psessionEntry->beaconParams.beaconInterval;
/* STA either received proprietary channel switch IE or 802.11h
@@ -2780,6 +2782,15 @@
psessionEntry->gLimChannelSwitch.switchTimeoutValue =
SYS_MS_TO_TICKS(beaconPeriod)* (pChnlSwitch->switchCount);
psessionEntry->gLimChannelSwitch.switchMode = pChnlSwitch->switchMode;
+#ifdef WLAN_FEATURE_11AC
+ pWiderChnlSwitch = &(pBeacon->WiderBWChanSwitchAnn);
+ if(pBeacon->WiderBWChanSwitchAnnPresent)
+ {
+ psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = pWiderChnlSwitch->newChanWidth;
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = pWiderChnlSwitch->newCenterChanFreq0;
+ psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = pWiderChnlSwitch->newCenterChanFreq1;
+ }
+#endif
/* Only primary channel switch element is present */
psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_ONLY;
@@ -2798,10 +2809,30 @@
psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
psessionEntry->gLimChannelSwitch.secondarySubBand = pBeacon->extChannelSwitchIE.secondaryChannelOffset;
}
+#ifdef WLAN_FEATURE_11AC
+ if(psessionEntry->vhtCapability && pBeacon->WiderBWChanSwitchAnnPresent)
+ {
+ if (pWiderChnlSwitch->newChanWidth == WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
+ {
+ if(pBeacon->extChannelSwitchPresent)
+ {
+ if ((pBeacon->extChannelSwitchIE.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_LOW_PRIMARY) ||
+ (pBeacon->extChannelSwitchIE.secondaryChannelOffset == PHY_DOUBLE_CHANNEL_HIGH_PRIMARY))
+ {
+ psessionEntry->gLimChannelSwitch.state = eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY;
+ psessionEntry->gLimChannelSwitch.secondarySubBand = limGet11ACPhyCBState(pMac,
+ psessionEntry->gLimChannelSwitch.primaryChannel,
+ pBeacon->extChannelSwitchIE.secondaryChannelOffset,
+ pWiderChnlSwitch->newCenterChanFreq0,
+ psessionEntry);
+ }
+ }
+ }
+ }
+#endif
}
}
- }
-
+ }
if (eSIR_SUCCESS != limStartChannelSwitch(pMac, psessionEntry))
{
PELOGW(limLog(pMac, LOGW, FL("Could not start Channel Switch\n"));)
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 9385f16..c3f996b 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -328,6 +328,10 @@
{
PopulateDot11fChanSwitchAnn( pMac, &bcn2.ChanSwitchAnn, psessionEntry );
PopulateDot11fExtChanSwitchAnn(pMac, &bcn2.ExtChanSwitchAnn, psessionEntry );
+#ifdef WLAN_FEATURE_11AC
+ if(psessionEntry->vhtCapability)
+ PopulateDot11fWiderBWChanSwitchAnn(pMac, &bcn2.WiderBWChanSwitchAnn, psessionEntry );
+#endif
}
#endif