summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-12-17 08:14:40 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-12-17 08:14:40 -0800
commit0efc9432f74e18b409706e662101f3ce2e330277 (patch)
tree5b856ba9086b3eebf71bdcbc2b4416a8ca99aa27
parentb8cc036f5d7278a50404288b364fbb2317e32902 (diff)
parent2c13e903f88caf686be7c865726695e593123c76 (diff)
Merge "Release 4.0.10.001 QCACLD WLAN Driver"
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h9
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c17
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c15
-rw-r--r--CORE/HDD/src/wlan_hdd_softap_tx_rx.c12
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c17
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c19
-rw-r--r--CORE/MAC/inc/qwlan_version.h8
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c43
-rw-r--r--CORE/SAP/src/sapModule.c151
-rw-r--r--CORE/SERVICES/DFS/inc/dfs.h2
-rw-r--r--CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c1
-rw-r--r--CORE/SERVICES/DFS/src/dfs_process_phyerr.c2
-rw-r--r--CORE/SERVICES/DFS/src/dfs_process_radarevent.c27
13 files changed, 240 insertions, 83 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 47201028ed1b..9842c956a89e 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -327,6 +327,15 @@ typedef struct hdd_tx_rx_stats_s
__u32 rxDropped;
__u32 rxDelivered;
__u32 rxRefused;
+
+ __u32 netq_disable_cnt;
+ __u32 netq_enable_cnt;
+ bool netq_state_off;
+
+ bool is_txflow_paused;
+ __u32 txflow_pause_cnt;
+ __u32 txflow_unpause_cnt;
+ __u32 txflow_timer_cnt;
} hdd_tx_rx_stats_t;
#ifdef WLAN_FEATURE_11W
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index e73044f49a41..840a6c34eec0 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -881,6 +881,8 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
// notify apps that we can't pass traffic anymore
netif_tx_disable(dev);
netif_carrier_off(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
#ifdef IPA_OFFLOAD
if (hdd_ipa_is_enabled(pHddCtx))
@@ -1719,6 +1721,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
since hdd_roamRegisterSTA will flush any cached data frames
immediately */
netif_tx_wake_all_queues(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_enable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = FALSE;
// Register the Station with TL after associated...
vosStatus = hdd_roamRegisterSTA( pAdapter,
@@ -1782,6 +1786,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
}
#endif
netif_tx_wake_all_queues(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_enable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = FALSE;
}
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
@@ -1935,6 +1941,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
netif_tx_disable(dev);
netif_carrier_off(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
}
@@ -2545,6 +2553,9 @@ static eHalStatus roamRoamConnectStatusUpdateHandler( hdd_adapter_t *pAdapter, t
// Stop only when we are inactive
netif_tx_disable(pAdapter->dev);
netif_carrier_off(pAdapter->dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
+
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Set HDD connState to eConnectionState_NotConnected",
__func__);
@@ -3507,6 +3518,8 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
{
struct net_device *dev = pAdapter->dev;
netif_tx_disable(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
/*
* Deregister for this STA with TL with the objective to flush
* all the packets for this STA from wmm_tx_queue. If not done here,
@@ -3543,6 +3556,8 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
// notify apps that we can't pass traffic anymore
netif_tx_disable(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
if (pHddStaCtx->ft_carrier_on == FALSE)
{
@@ -3571,6 +3586,8 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
"Roaming started due to connection lost");
netif_tx_disable(pAdapter->dev);
netif_carrier_off(pAdapter->dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
break;
}
case eCSR_ROAM_DISASSOCIATED:
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 5695fddb43a4..7fc6f3d3014f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -5740,8 +5740,19 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
smeConfig->csrConfig.phyMode = hdd_cfg_xlate_to_csr_phy_mode ( pConfig->dot11Mode );
- smeConfig->csrConfig.channelBondingMode24GHz = pConfig->nChannelBondingMode24GHz;
- smeConfig->csrConfig.channelBondingMode5GHz = pConfig->nChannelBondingMode5GHz;
+ if (pConfig->dot11Mode == eHDD_DOT11_MODE_abg ||
+ pConfig->dot11Mode == eHDD_DOT11_MODE_11b ||
+ pConfig->dot11Mode == eHDD_DOT11_MODE_11g ||
+ pConfig->dot11Mode == eHDD_DOT11_MODE_11b_ONLY ||
+ pConfig->dot11Mode == eHDD_DOT11_MODE_11g_ONLY) {
+ smeConfig->csrConfig.channelBondingMode24GHz = 0;
+ smeConfig->csrConfig.channelBondingMode5GHz = 0;
+ } else {
+ smeConfig->csrConfig.channelBondingMode24GHz =
+ pConfig->nChannelBondingMode24GHz;
+ smeConfig->csrConfig.channelBondingMode5GHz =
+ pConfig->nChannelBondingMode5GHz;
+ }
smeConfig->csrConfig.TxRate = pConfig->TxRate;
smeConfig->csrConfig.nScanResultAgeCount = pConfig->ScanResultAgeCount;
smeConfig->csrConfig.scanAgeTimeNCNPS = pConfig->nScanAgeTimeNCNPS;
diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
index 989e56d06e19..ec4e387963b9 100644
--- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
@@ -197,6 +197,9 @@ void hdd_softap_tx_resume_cb(void *adapter_context,
}
netif_tx_wake_all_queues(pAdapter->dev);
+ pAdapter->hdd_stats.hddTxRxStats.txflow_unpause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = FALSE;
+
}
#if defined(CONFIG_PER_VDEV_TX_DESC_POOL)
else if (VOS_FALSE == tx_resume) /* Pause TX */
@@ -213,7 +216,13 @@ void hdd_softap_tx_resume_cb(void *adapter_context,
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Failed to start tx_flow_control_timer", __func__);
}
+ else
+ {
+ pAdapter->hdd_stats.hddTxRxStats.txflow_stats.txflow_timer_cnt++;
+ }
}
+ pAdapter->hdd_stats.hddTxRxStats.txflow_pause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = TRUE;
}
#endif
@@ -324,6 +333,9 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
netif_tx_stop_all_queues(dev);
vos_timer_start(&pAdapter->tx_flow_control_timer,
WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME);
+ pAdapter->hdd_stats.hddTxRxStats.txflow_timer_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.txflow_pause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = TRUE;
}
}
#endif /* QCA_LL_TX_FLOW_CT */
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index f07843cd8eaf..e2cf1e1ffa3c 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -649,6 +649,9 @@ void hdd_tx_resume_timer_expired_handler(void *adapter_context)
}
netif_tx_wake_all_queues(pAdapter->dev);
+ pAdapter->hdd_stats.hddTxRxStats.txflow_unpause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = FALSE;
+
return;
}
@@ -689,6 +692,9 @@ void hdd_tx_resume_cb(void *adapter_context,
return;
}
netif_tx_wake_all_queues(pAdapter->dev);
+ pAdapter->hdd_stats.hddTxRxStats.txflow_unpause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = FALSE;
+
}
#if defined(CONFIG_PER_VDEV_TX_DESC_POOL)
else if (VOS_FALSE == tx_resume) /* Pause TX */
@@ -705,7 +711,14 @@ void hdd_tx_resume_cb(void *adapter_context,
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Failed to start tx_flow_control_timer", __func__);
}
+ else
+ {
+ pAdapter->hdd_stats.hddTxRxStats.txflow_stats.txflow_timer_cnt++;
+ }
}
+ pAdapter->hdd_stats.hddTxRxStats.txflow_pause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = TRUE;
+
}
#endif
@@ -826,6 +839,9 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
vos_timer_getCurrentState(&pAdapter->tx_flow_control_timer))) {
vos_timer_start(&pAdapter->tx_flow_control_timer,
WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME);
+ pAdapter->hdd_stats.hddTxRxStats.txflow_timer_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.txflow_pause_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.is_txflow_paused = TRUE;
}
}
#endif /* QCA_LL_TX_FLOW_CT */
@@ -1614,7 +1630,6 @@ VOS_STATUS hdd_tx_fetch_packet_cbk( v_VOID_t *vosContext,
return status;
}
-
/**============================================================================
@brief hdd_tx_low_resource_cbk() - Callback function invoked in the
case where VOS packets are not available at the time of the call to get
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 5307a165cf5e..e508c110f471 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -685,7 +685,13 @@ void hdd_wlan_get_stats(hdd_adapter_t *pAdapter, v_U16_t *length,
"\ncompleted %u,"
"\n\nReceive"
"\nchains %u, packets %u, dropped %u, delivered %u, refused %u"
- "\n",
+ "\n"
+ "\nNetQueue State %s"
+ "\ndisable count %u, enable count %u"
+ "\n\nTX_FLOW"
+ "\nCurrent status %s"
+ "\ntx-flow timer start count %u"
+ "\npause count %u, unpause count %u",
pStats->txXmitCalled,
pStats->txXmitDropped,
@@ -705,7 +711,14 @@ void hdd_wlan_get_stats(hdd_adapter_t *pAdapter, v_U16_t *length,
pStats->rxPackets,
pStats->rxDropped,
pStats->rxDelivered,
- pStats->rxRefused
+ pStats->rxRefused,
+ (pStats->netq_state_off == TRUE ? "OFF": "ON"),
+ pStats->netq_disable_cnt,
+ pStats->netq_enable_cnt,
+ (pStats->is_txflow_paused == TRUE ? "paused": "unpaused"),
+ pStats->txflow_timer_cnt,
+ pStats->txflow_pause_cnt,
+ pStats->txflow_unpause_cnt
);
*length = strlen(buffer) + 1;
}
@@ -4686,6 +4699,8 @@ static int iw_set_mlme(struct net_device *dev,
netif_tx_disable(dev);
netif_carrier_off(dev);
+ pAdapter->hdd_stats.hddTxRxStats.netq_disable_cnt++;
+ pAdapter->hdd_stats.hddTxRxStats.netq_state_off = TRUE;
}
else
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 00ac54967f82..5fcc2d41c544 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -38,13 +38,13 @@ BRIEF DESCRIPTION:
===========================================================================*/
-#define QWLAN_VERSION_MAJOR 1
+#define QWLAN_VERSION_MAJOR 4
#define QWLAN_VERSION_MINOR 0
-#define QWLAN_VERSION_PATCH 0
+#define QWLAN_VERSION_PATCH 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 255
+#define QWLAN_VERSION_BUILD 001
-#define QWLAN_VERSIONSTR "1.0.0.255B"
+#define QWLAN_VERSIONSTR "4.0.10.001"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index 9eaff2c2fa94..c6fca3359b17 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -7548,10 +7548,18 @@ _sap_offload_parse_assoc_req(tpAniSirGlobal pmac,
mac_assoc_req = (tpSirMacAssocReqFrame)frame_body;
mac_assoc_req->capabilityInfo.privacy = 0;
- status = sirConvertAssocReqFrame2Struct(pmac,
+ if (mac_hdr->fc.subType == SIR_MAC_MGMT_ASSOC_REQ) {
+ status = sirConvertAssocReqFrame2Struct(pmac,
frame_body,
add_sta_req->conn_req_len,
assoc_req);
+ } else {
+ status = sirConvertReassocReqFrame2Struct(pmac,
+ frame_body,
+ add_sta_req->conn_req_len,
+ assoc_req);
+ }
+
if (status != eSIR_SUCCESS) {
limLog(pmac, LOGW, FL("sap_offload_add_sta_req parse error\n"));
goto error;
@@ -7834,25 +7842,32 @@ void lim_sap_offload_add_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq)
{
tpSirAssocReq assoc_req = NULL;
tpDphHashNode sta_ds = NULL;
-
+ tpSirMacMgmtHdr mac_hdr = NULL;
struct sap_offload_add_sta_req *add_sta_req = NULL;
tpPESession session_entry = limIsApSessionActive(pmac);
+ add_sta_req = (struct sap_offload_add_sta_req *)lim_msgq->bodyptr;
+ mac_hdr = (tpSirMacMgmtHdr)add_sta_req->conn_req;
if (session_entry == NULL) {
PELOGE(limLog(pmac, LOGE, FL(" Session not found"));)
return;
}
- add_sta_req = (struct sap_offload_add_sta_req *)lim_msgq->bodyptr;
assoc_req = vos_mem_malloc(sizeof(*assoc_req));
if (NULL == assoc_req) {
- limLog(pmac, LOGP, FL("Allocate Memory failed in AssocReq"));
- return;
+ PELOGE(limLog(pmac, LOGE, FL("Allocate Memory failed in assoc_req"));)
+ goto error;
}
vos_mem_set(assoc_req , sizeof(*assoc_req), 0);
/* parse Assoc req frame for station information */
sta_ds = _sap_offload_parse_assoc_req(pmac, assoc_req, add_sta_req);
if (sta_ds == NULL) {
+ limSendDisassocMgmtFrame(pmac,
+ eSIR_MAC_UNSPEC_FAILURE_REASON,
+ mac_hdr->sa,
+ session_entry, FALSE);
+ PELOGE(limLog(pmac, LOGE, FL("could not add hash entry."
+ " disassoc sta %pM"),mac_hdr->sa);)
vos_mem_free(assoc_req);
goto error;
}
@@ -7863,7 +7878,13 @@ void lim_sap_offload_add_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq)
/* Parse Station HT/VHT information */
if (_sap_offload_parse_sta_vht(pmac, sta_ds, assoc_req)
== eSIR_FAILURE) {
- goto error;
+ limSendDisassocMgmtFrame(pmac,
+ eSIR_MAC_UNSPEC_FAILURE_REASON,
+ mac_hdr->sa,
+ session_entry, FALSE);
+ PELOGE(limLog(pmac, LOGE, FL("mismatch ht/vht information"
+ " disassoc sta %pM"),mac_hdr->sa);)
+ goto error;
}
/* Parse Station QOS information */
@@ -7889,8 +7910,12 @@ void lim_sap_offload_add_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq)
session_entry->parsedAssocReq[sta_ds->assocId] = assoc_req;
if (limAddSta(pmac, sta_ds, false, session_entry) != eSIR_SUCCESS) {
- limLog(pmac, LOGE, FL("could not Add STA with assocId=%d"),
- sta_ds->assocId);
+ limLog(pmac, LOGE, FL("could not Add STA %pM with assocId=%d"),
+ mac_hdr->sa, sta_ds->assocId);
+ limSendDisassocMgmtFrame(pmac,
+ eSIR_MAC_UNSPEC_FAILURE_REASON,
+ mac_hdr->sa,
+ session_entry, FALSE);
}
error:
@@ -7908,7 +7933,7 @@ lim_sap_offload_del_sta(tpAniSirGlobal pmac, tpSirMsgQ lim_msgq)
if (psession_entry == NULL) {
PELOGE(limLog(pmac, LOGE, FL(" Session not found"));)
- goto error;
+ return;
}
del_sta_req = ( struct sap_offload_del_sta_req *)lim_msgq->bodyptr;
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index 5ca1f3001403..b0039037f7a9 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -3546,74 +3546,97 @@ v_VOID_t WLANSAP_extend_to_acs_range(v_U8_t operatingBand,
v_U8_t *bandStartChannel,
v_U8_t *bandEndChannel)
{
-#define ACS_2G_EXTEND 4
-#define ACS_5G_EXTEND 12
+#define ACS_WLAN_20M_CH_INC 4
+#define ACS_2G_EXTEND ACS_WLAN_20M_CH_INC
+#define ACS_5G_EXTEND (ACS_WLAN_20M_CH_INC * 3)
- switch(operatingBand)
- {
- case eSAP_RF_SUBBAND_2_4_GHZ:
- *bandStartChannel = RF_CHAN_1;
- *bandEndChannel = RF_CHAN_14;
- *startChannelNum = *startChannelNum > 5 ?
- (*startChannelNum - ACS_2G_EXTEND): 1;
- *endChannelNum = (*endChannelNum + ACS_2G_EXTEND) <= 14 ?
- (*endChannelNum + ACS_2G_EXTEND):14;
- break;
-
- case eSAP_RF_SUBBAND_5_LOW_GHZ:
- *bandStartChannel = RF_CHAN_36;
- *bandEndChannel = RF_CHAN_64;
- *startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 36 ?
- (*startChannelNum - ACS_5G_EXTEND):36;
- *endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 64?
- (*endChannelNum + ACS_5G_EXTEND):64;
- break;
-
- case eSAP_RF_SUBBAND_5_MID_GHZ:
- *bandStartChannel = RF_CHAN_100;
- *startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 100 ?
- (*startChannelNum - ACS_5G_EXTEND):100;
+ v_U8_t tmp_startChannelNum = 0, tmp_endChannelNum = 0;
+
+ switch(operatingBand)
+ {
+ case eSAP_RF_SUBBAND_2_4_GHZ:
+ *bandStartChannel = RF_CHAN_1;
+ *bandEndChannel = RF_CHAN_14;
+ tmp_startChannelNum = *startChannelNum > 5 ?
+ (*startChannelNum - ACS_2G_EXTEND): 1;
+ tmp_endChannelNum = (*endChannelNum + ACS_2G_EXTEND) <= 14 ?
+ (*endChannelNum + ACS_2G_EXTEND):14;
+ break;
+
+ case eSAP_RF_SUBBAND_5_LOW_GHZ:
+ *bandStartChannel = RF_CHAN_36;
+ *bandEndChannel = RF_CHAN_64;
+ tmp_startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 36 ?
+ (*startChannelNum - ACS_5G_EXTEND):36;
+ tmp_endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 64?
+ (*endChannelNum + ACS_5G_EXTEND):64;
+ break;
+
+ case eSAP_RF_SUBBAND_5_MID_GHZ:
+ *bandStartChannel = RF_CHAN_100;
+ tmp_startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 100 ?
+ (*startChannelNum - ACS_5G_EXTEND):100;
#ifndef FEATURE_WLAN_CH144
- *bandEndChannel = RF_CHAN_140;
- *endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 140 ?
- (*endChannelNum + ACS_5G_EXTEND):140;
+ *bandEndChannel = RF_CHAN_140;
+ tmp_endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 140 ?
+ (*endChannelNum + ACS_5G_EXTEND):140;
#else
- *bandEndChannel = RF_CHAN_144;
- *endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 144 ?
- (*endChannelNum + ACS_5G_EXTEND):144;
+ *bandEndChannel = RF_CHAN_144;
+ tmp_endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 144 ?
+ (*endChannelNum + ACS_5G_EXTEND):144;
#endif /* FEATURE_WLAN_CH144 */
- break;
-
- case eSAP_RF_SUBBAND_5_HIGH_GHZ:
- *bandStartChannel = RF_CHAN_149;
- *bandEndChannel = RF_CHAN_165;
- *startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 149 ?
- (*startChannelNum - ACS_5G_EXTEND):149;
- *endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 165 ?
- (*endChannelNum + ACS_5G_EXTEND):165;
- break;
-
- case eSAP_RF_SUBBAND_5_ALL_GHZ:
- *bandStartChannel = RF_CHAN_36;
- *bandEndChannel = RF_CHAN_165;
- *startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 36 ?
- (*startChannelNum - ACS_5G_EXTEND):36;
- *endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 165 ?
- (*endChannelNum + ACS_5G_EXTEND):165;
- break;
-
- default:
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- "sapGetChannelList:OperatingBand not valid ");
- /* assume 2.4 GHz */
- *bandStartChannel = RF_CHAN_1;
- *bandEndChannel = RF_CHAN_14;
- *startChannelNum = *startChannelNum > 5 ?
- (*startChannelNum - ACS_2G_EXTEND): 1;
- *endChannelNum = (*endChannelNum + ACS_2G_EXTEND) <= 14 ?
- (*endChannelNum + ACS_2G_EXTEND):14;
- break;
- }
+ break;
+
+ case eSAP_RF_SUBBAND_5_HIGH_GHZ:
+ *bandStartChannel = RF_CHAN_149;
+ *bandEndChannel = RF_CHAN_165;
+ tmp_startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 149 ?
+ (*startChannelNum - ACS_5G_EXTEND):149;
+ tmp_endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 165 ?
+ (*endChannelNum + ACS_5G_EXTEND):165;
+ break;
+
+ case eSAP_RF_SUBBAND_5_ALL_GHZ:
+ *bandStartChannel = RF_CHAN_36;
+ *bandEndChannel = RF_CHAN_165;
+ tmp_startChannelNum = (*startChannelNum - ACS_5G_EXTEND) > 36 ?
+ (*startChannelNum - ACS_5G_EXTEND):36;
+ tmp_endChannelNum = (*endChannelNum + ACS_5G_EXTEND) <= 165 ?
+ (*endChannelNum + ACS_5G_EXTEND):165;
+ break;
+
+ default:
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ "sapGetChannelList:OperatingBand not valid ");
+ /* assume 2.4 GHz */
+ *bandStartChannel = RF_CHAN_1;
+ *bandEndChannel = RF_CHAN_14;
+ tmp_startChannelNum = *startChannelNum > 5 ?
+ (*startChannelNum - ACS_2G_EXTEND): 1;
+ tmp_endChannelNum = (*endChannelNum + ACS_2G_EXTEND) <= 14 ?
+ (*endChannelNum + ACS_2G_EXTEND):14;
+ break;
+ }
+
+ /* Note if the ACS range include only DFS channels, do not cross the range.
+ * Active scanning in adjacent non DFS channels results in transmission
+ * spikes in DFS specturm channels which is due to emission spill.
+ * Remove the active channels from extend ACS range for DFS only range
+ */
+ if (VOS_IS_DFS_CH(*startChannelNum)) {
+ while (!VOS_IS_DFS_CH(tmp_startChannelNum) && tmp_startChannelNum <
+ *startChannelNum)
+ tmp_startChannelNum += ACS_WLAN_20M_CH_INC;
+
+ *startChannelNum = tmp_startChannelNum;
+ }
+ if (VOS_IS_DFS_CH(*endChannelNum)) {
+ while (!VOS_IS_DFS_CH(tmp_endChannelNum) && tmp_endChannelNum >
+ *endChannelNum)
+ tmp_endChannelNum -= ACS_WLAN_20M_CH_INC;
+
+ *endChannelNum = tmp_endChannelNum;
+ }
}
/*==========================================================================
diff --git a/CORE/SERVICES/DFS/inc/dfs.h b/CORE/SERVICES/DFS/inc/dfs.h
index 64c091d97048..a960f7e24aaa 100644
--- a/CORE/SERVICES/DFS/inc/dfs.h
+++ b/CORE/SERVICES/DFS/inc/dfs.h
@@ -275,6 +275,7 @@ struct dfs_event {
u_int32_t re_freq; /* Centre frequency of event, KHz */
u_int32_t re_freq_lo; /* Lower bounds of frequency, KHz */
u_int32_t re_freq_hi; /* Upper bounds of frequency, KHz */
+ int sidx; /* Pulse Index as in radar summary report */
STAILQ_ENTRY(dfs_event) re_list; /* List of radar events */
} adf_os_packed;
#ifdef WIN32
@@ -687,6 +688,7 @@ struct dfs_phy_err {
u_int8_t rssi; /* pulse RSSI */
u_int8_t dur; /* pulse duration, raw (not uS) */
+ int sidx; /* Pulse Index as in radar summary report */
};
/* Attach, detach, handle ioctl prototypes */
diff --git a/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c b/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
index b14106b070f2..27238522b852 100644
--- a/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
+++ b/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
@@ -659,6 +659,7 @@ dfs_process_phyerr_bb_tlv(struct ath_dfs *dfs, void *buf, u_int16_t datalen,
OS_MEMSET(e, 0, sizeof(*e));
e->rssi = rs.rssi;
e->dur = rs.pulse_duration;
+ e->sidx = rs.sidx;
e->is_pri = 1; /* XXX always PRI for now */
e->is_ext = 0;
e->is_dc = 0;
diff --git a/CORE/SERVICES/DFS/src/dfs_process_phyerr.c b/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
index c08c9e75b655..e85eaf04d055 100644
--- a/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
+++ b/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
@@ -755,6 +755,7 @@ dfs_process_phyerr(struct ieee80211com *ic, void *buf, u_int16_t datalen,
event->re_ts = (e.rs_tstamp) & DFS_TSMASK;
event->re_chanindex = dfs->dfs_curchan_radindex;
event->re_flags = 0;
+ event->sidx = e.sidx;
/*
* Handle chirp flags.
@@ -831,6 +832,7 @@ dfs_process_phyerr(struct ieee80211com *ic, void *buf, u_int16_t datalen,
event->re_full_ts = e.fulltsf;
event->re_ts = (e.rs_tstamp) & DFS_TSMASK;
event->re_rssi = e.rssi;
+ event->sidx = e.sidx;
/*
* Handle chirp flags.
diff --git a/CORE/SERVICES/DFS/src/dfs_process_radarevent.c b/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
index 1154ee82bf40..424f2a691f9b 100644
--- a/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
+++ b/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
@@ -380,8 +380,29 @@ dfs_process_radarevent(struct ath_dfs *dfs, struct ieee80211_channel *chan)
dfs_reset_alldelaylines(dfs);
dfs_reset_radarq(dfs);
}
+
found = 0;
+ /*
+ * In FCC or JAPAN domain,if the follwing signature matches
+ * its likely that this is a false radar pulse pattern
+ * so process the next pulse in the queue.
+ */
+ if ((DFS_FCC_DOMAIN == dfs->dfsdomain ||
+ DFS_MKK4_DOMAIN == dfs->dfsdomain) &&
+ (re.re_dur >= 11 && re.re_dur <= 20) &&
+ (diff_ts > 500 || diff_ts <= 305) &&
+ (re.sidx == -4)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
+ "\n%s: Rejecting on Peak Index = %d,re.re_dur = %d,diff_ts = %d\n",
+ __func__,re.sidx, re.re_dur, diff_ts);
+
+ ATH_DFSQ_LOCK(dfs);
+ empty = STAILQ_EMPTY(&(dfs->dfs_radarq));
+ ATH_DFSQ_UNLOCK(dfs);
+ continue;
+ }
+
/* BIN5 pulses are FCC and Japan specific */
if ((dfs->dfsdomain == DFS_FCC_DOMAIN) || (dfs->dfsdomain == DFS_MKK4_DOMAIN)) {
@@ -516,7 +537,11 @@ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO, "%s[%d]:filterID= %d :: Rejec
DFS_DPRINTK(dfs, ATH_DEBUG_DFS3,
"Found on channel minDur = %d, filterId = %d",ft->ft_mindur,
rf != NULL ? rf->rf_pulseid : -1);
- }
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
+ "%s[%d]:### Found on channel minDur = %d, filterId = %d ###",
+ __func__,__LINE__,ft->ft_mindur,
+ rf != NULL ? rf->rf_pulseid : -1);
+ }
tabledepth++;
}
ATH_DFSQ_LOCK(dfs);