summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-02-06 12:00:03 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-06 12:00:03 -0800
commit0d56e7fd0c92d742d1769bcc62259ce4d0a77d1f (patch)
treebb1790ad13bd4ee25bfdff7a0467d0ef647fde42
parentc0b12edabc3b46182c314585720a77caeb0f9441 (diff)
parenta1d9e944719944a8981355de6ff740dfaf7d59b1 (diff)
Merge "Release 4.0.10.29 QCACLD WLAN Driver"
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c54
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c49
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/SAP/src/sapChSelect.c70
-rw-r--r--CORE/SAP/src/sapFsm.c51
-rwxr-xr-xKbuild1
6 files changed, 134 insertions, 95 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index a2e1f4f6410a..c51b21e63101 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -5126,7 +5126,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)is_driver_dfs_capable
+ .doit = is_driver_dfs_capable
},
#ifdef WLAN_FEATURE_NAN
@@ -5136,7 +5136,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_nan_request
+ .doit = wlan_hdd_cfg80211_nan_request
},
#endif
@@ -5147,7 +5147,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_stats_ext_request
+ .doit = wlan_hdd_cfg80211_stats_ext_request
},
#endif
#ifdef FEATURE_WLAN_EXTSCAN
@@ -5157,7 +5157,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_start
+ .doit = wlan_hdd_cfg80211_extscan_start
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5165,14 +5165,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_stop
+ .doit = wlan_hdd_cfg80211_extscan_stop
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_GET_VALID_CHANNELS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_extscan_get_valid_channels
+ .doit = wlan_hdd_cfg80211_extscan_get_valid_channels
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5180,7 +5180,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_get_capabilities
+ .doit = wlan_hdd_cfg80211_extscan_get_capabilities
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5188,7 +5188,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_get_cached_results
+ .doit = wlan_hdd_cfg80211_extscan_get_cached_results
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5196,7 +5196,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_set_bssid_hotlist
+ .doit = wlan_hdd_cfg80211_extscan_set_bssid_hotlist
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5204,7 +5204,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_reset_bssid_hotlist
+ .doit = wlan_hdd_cfg80211_extscan_reset_bssid_hotlist
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5212,7 +5212,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_set_significant_change
+ .doit = wlan_hdd_cfg80211_extscan_set_significant_change
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5220,7 +5220,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_extscan_reset_significant_change
+ .doit = wlan_hdd_cfg80211_extscan_reset_significant_change
},
#endif /* FEATURE_WLAN_EXTSCAN */
@@ -5231,7 +5231,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_ll_stats_clear
+ .doit = wlan_hdd_cfg80211_ll_stats_clear
},
{
@@ -5240,7 +5240,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_ll_stats_set
+ .doit = wlan_hdd_cfg80211_ll_stats_set
},
{
@@ -5249,7 +5249,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_ll_stats_get
+ .doit = wlan_hdd_cfg80211_ll_stats_get
},
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
#ifdef FEATURE_WLAN_TDLS
@@ -5260,7 +5260,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_exttdls_enable
+ .doit = wlan_hdd_cfg80211_exttdls_enable
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
@@ -5268,14 +5268,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_exttdls_disable
+ .doit = wlan_hdd_cfg80211_exttdls_disable
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_exttdls_get_status
+ .doit = wlan_hdd_cfg80211_exttdls_get_status
},
#endif
{
@@ -5283,28 +5283,28 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_get_supported_features
+ .doit = wlan_hdd_cfg80211_get_supported_features
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SCANNING_MAC_OUI,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_set_scanning_mac_oui
+ .doit = wlan_hdd_cfg80211_set_scanning_mac_oui
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NO_DFS_FLAG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_disable_dfs_chan_scan
+ .doit = wlan_hdd_cfg80211_disable_dfs_chan_scan
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_get_concurrency_matrix
+ .doit = wlan_hdd_cfg80211_get_concurrency_matrix
},
#ifdef WLAN_FEATURE_APFIND
{
@@ -5312,7 +5312,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_APFIND,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_apfind_cmd
+ .doit = wlan_hdd_cfg80211_apfind_cmd
},
#endif /* WLAN_FEATURE_APFIND */
@@ -5323,7 +5323,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_do_acs
+ .doit = wlan_hdd_cfg80211_do_acs
},
#endif
{
@@ -5332,14 +5332,14 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_ocb_set_schedule
+ .doit = wlan_hdd_cfg80211_ocb_set_schedule
},
{
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
- .doit = (void *)wlan_hdd_cfg80211_get_features
+ .doit = wlan_hdd_cfg80211_get_features
},
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
{
@@ -5348,7 +5348,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
- .doit = (void *)wlan_hdd_cfg80211_keymgmt_set_key
+ .doit = wlan_hdd_cfg80211_keymgmt_set_key
},
#endif
};
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 897c12b36bbc..640c368af776 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -302,6 +302,8 @@ struct hdd_ipa_stats {
uint64_t num_freeq_empty;
uint64_t num_pri_freeq_empty;
uint64_t num_rx_excep;
+ uint64_t num_tx_bcmc;
+ uint64_t num_tx_bcmc_err;
};
#ifdef IPA_UC_OFFLOAD
@@ -1047,12 +1049,16 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt)
"IND RING SIZE: %d\n"
"IND RING DBELL : 0x%x\n"
"PROC DONE IND ADDR : 0x%x\n"
- "NUM EXCP PKT : %llu",
+ "NUM EXCP PKT : %llu\n"
+ "NUM TX BCMC : %llu\n"
+ "NUM TX BCMC ERR : %llu",
hdd_ctx->rx_rdy_ring_base_paddr,
hdd_ctx->rx_rdy_ring_size,
hdd_ctx->rx_ready_doorbell_paddr,
hdd_ctx->rx_proc_done_idx_paddr,
- hdd_ipa->stats.num_rx_excep);
+ hdd_ipa->stats.num_rx_excep,
+ hdd_ipa->stats.num_tx_bcmc,
+ hdd_ipa->stats.num_tx_bcmc_err);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"==== IPA_UC WLAN_HOST CONTROL ====\n"
"SAP NUM STAs: %d\n"
@@ -2163,8 +2169,14 @@ static void hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
struct ipa_tx_data_desc *done_desc_head, *done_desc, *tmp;
adf_nbuf_t skb;
uint8_t iface_id;
+ struct hdd_ipa_iface_context *iface_context;
#ifdef IPA_UC_OFFLOAD
uint8_t session_id;
+#ifdef INTRA_BSS_FWD_OFFLOAD
+ struct ethhdr *eth;
+ adf_nbuf_t copy;
+ int ret;
+#endif
#endif
adf_nbuf_t buf;
@@ -2197,7 +2209,8 @@ static void hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
return;
}
- adapter = hdd_ipa->iface_context[iface_id].adapter;
+ iface_context = &hdd_ipa->iface_context[iface_id];
+ adapter = iface_context->adapter;
HDD_IPA_DBG_DUMP(VOS_TRACE_LEVEL_DEBUG,
"w2i -- skb", skb->data, 8);
@@ -2211,7 +2224,35 @@ static void hdd_ipa_w2i_cb(void *priv, enum ipa_dp_evt_type evt,
skb_pull(skb, HDD_IPA_WLAN_CLD_HDR_LEN);
}
- hdd_ipa->iface_context[iface_id].stats.num_rx_ipa_excep++;
+ iface_context->stats.num_rx_ipa_excep++;
+
+#if defined(IPA_UC_OFFLOAD) && defined(INTRA_BSS_FWD_OFFLOAD)
+ eth = (struct ethhdr *)skb->data;
+
+ /*
+ * When INTRA_BSS_FWD_OFFLOAD is enabled, FW will send all Rx
+ * packets to IPA uC, which need to be forwarded to other
+ * interface.
+ * And, since only IP packets are forwarded through IPA Ethernet
+ * Bridging, non-IP exception packets should be forwarded to Tx
+ * here.
+ */
+ if (eth->h_proto != be16_to_cpu(ETH_P_IP)) {
+ copy = adf_nbuf_copy(skb);
+ if (copy) {
+ ret = hdd_softap_hard_start_xmit(
+ (struct sk_buff *)copy, adapter->dev);
+ if (ret) {
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_DEBUG,
+ "Forward packet tx fail");
+ hdd_ipa->stats.num_tx_bcmc_err++;
+ } else {
+ hdd_ipa->stats.num_tx_bcmc++;
+ }
+ }
+ }
+#endif
+
hdd_ipa_send_skb_to_network(skb, adapter);
break;
case IPA_WRITE_DONE:
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 6f2f3ff2cbe3..7f6da09a675d 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 28
+#define QWLAN_VERSION_BUILD 29
-#define QWLAN_VERSIONSTR "4.0.10.28"
+#define QWLAN_VERSIONSTR "4.0.10.29"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c
index 83a7e0f3f5a4..faf14a323159 100644
--- a/CORE/SAP/src/sapChSelect.c
+++ b/CORE/SAP/src/sapChSelect.c
@@ -189,34 +189,6 @@ typedef enum {
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
/**
- * sap_check_in_avoid_ch_list() - checks if given channel present is channel
- * avoidance list
- * avoid_channels_info struct
- * @sap_ctx: sap context.
- * @channel: channel to be checked in sap_ctx's avoid ch list
- *
- * sap_ctx contains sap_avoid_ch_info strcut containing the list of channels on
- * which MDM device's AP with MCC was detected. This function checks if given
- * channel is present in that list.
- *
- * Return: true, if channel was present, false othersie.
- */
-bool
-sap_check_in_avoid_ch_list(ptSapContext sap_ctx, uint8_t channel)
-{
- uint8_t i = 0;
- struct sap_avoid_channels_info *ie_info =
- &sap_ctx->sap_detected_avoid_ch_ie;
-
- for (i = 0; i < sizeof(ie_info->channels); i++) {
- if (ie_info->channels[i] == channel) {
- return true;
- }
- }
- return false;
-}
-
-/**
* sap_check_n_add_channel() - checks and add given channel in sap context's
* avoid_channels_info struct
* @sap_ctx: sap context.
@@ -318,11 +290,13 @@ sap_check_n_add_overlapped_chnls(ptSapContext sap_ctx,
* @hal: hal handle
* @sap_ctx: sap context.
* @scan_result: scan results for ACS scan.
+ * @spect_info: spectrum weights array to update
*
* Detection of Q2Q IE indicates presence of another MDM device with its AP
* operating in MCC mode. This function parses the scan results and processes
* the Q2Q IE if found. It then extracts the channels and populates them in
- * sap_ctx struct.
+ * sap_ctx struct. It also increases the weights of those channels so that
+ * ACS logic will avoid those channels in its selection algorithm.
*
* Return: void
*/
@@ -330,15 +304,19 @@ sap_check_n_add_overlapped_chnls(ptSapContext sap_ctx,
void
sap_process_avoid_ie(tHalHandle hal,
ptSapContext sap_ctx,
- tScanResultHandle scan_result)
+ tScanResultHandle scan_result,
+ tSapChSelSpectInfo *spect_info)
{
uint32_t total_ie_len = 0;
uint8_t *temp_ptr = NULL;
+ uint8_t i = 0;
struct sAvoidChannelIE *avoid_ch_ie;
tCsrScanResultInfo *node = NULL;
tpAniSirGlobal mac_ctx = NULL;
+ tSapSpectChInfo *spect_ch = NULL;
mac_ctx = PMAC_STRUCT(hal);
+ spect_ch = spect_info->pSpectCh;
node = sme_ScanResultGetFirst(hal, scan_result);
while (node) {
@@ -366,6 +344,16 @@ sap_process_avoid_ie(tHalHandle hal,
avoid_ch_ie->channel);
sap_check_n_add_overlapped_chnls(sap_ctx,
avoid_ch_ie->channel);
+ /*
+ * Mark weight of these channel present in IE to MAX
+ * so that ACS logic will to avoid thse channels
+ */
+ for (i = 0; i < spect_info->numSpectChans; i++) {
+ if (spect_ch[i].chNum == avoid_ch_ie->channel) {
+ spect_ch[i].weight = ACS_WEIGHT_MAX;
+ break;
+ }
+ }
} /* if (temp_ptr) */
node = sme_ScanResultGetNext(hal, scan_result);
}
@@ -850,18 +838,6 @@ v_BOOL_t sapChanSelInit(tHalHandle halHandle,
channelnum++, pChans++) {
chSafe = VOS_TRUE;
-#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
- if(pMac->sap.sap_channel_avoidance) {
- if(sap_check_in_avoid_ch_list(pSapCtx, *pChans)) {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
- "Ch %d used by another MDM device with SAP in MCC",
- *pChans);
- chSafe = VOS_FALSE;
- continue;
- }
- }
-#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
-
/* check if the channel is in NOL blacklist */
if(sapDfsIsChannelInNolList(pSapCtx, *pChans,
PHY_SINGLE_CHANNEL_CENTERED))
@@ -2705,11 +2681,6 @@ v_U8_t sapSelectChannel(tHalHandle halHandle, ptSapContext pSapCtx, tScanResult
#endif /* SOFTAP_CHANNEL_RANGE */
}
-#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
- /* process avoid channel IE to collect all channels to avoid */
- sap_process_avoid_ie(halHandle, pSapCtx, pScanResult);
-#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
-
// Initialize the structure pointed by pSpectInfoParams
if (sapChanSelInit( halHandle, pSpectInfoParams, pSapCtx ) != eSAP_TRUE ) {
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
@@ -2720,6 +2691,11 @@ v_U8_t sapSelectChannel(tHalHandle halHandle, ptSapContext pSapCtx, tScanResult
// Compute the weight of the entire spectrum in the operating band
sapComputeSpectWeight( pSpectInfoParams, halHandle, pScanResult);
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ /* process avoid channel IE to collect all channels to avoid */
+ sap_process_avoid_ie(halHandle, pSapCtx, pScanResult, pSpectInfoParams);
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
#ifdef SOFTAP_CHANNEL_RANGE
if (eCSR_BAND_ALL == pSapCtx->scanBandPreference)
{
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 0792b8841a07..14eb4e322a89 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -1326,6 +1326,35 @@ v_BOOL_t sapDfsIsChannelInPreferredLocation(tHalHandle hHal, v_U8_t channelID)
return VOS_TRUE;
}
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+/**
+ * sap_check_in_avoid_ch_list() - checks if given channel present is channel
+ * avoidance list
+ * avoid_channels_info struct
+ * @sap_ctx: sap context.
+ * @channel: channel to be checked in sap_ctx's avoid ch list
+ *
+ * sap_ctx contains sap_avoid_ch_info strcut containing the list of channels on
+ * which MDM device's AP with MCC was detected. This function checks if given
+ * channel is present in that list.
+ *
+ * Return: true, if channel was present, false othersie.
+ */
+static bool
+sap_check_in_avoid_ch_list(ptSapContext sap_ctx, uint8_t channel)
+{
+ uint8_t i = 0;
+ struct sap_avoid_channels_info *ie_info =
+ &sap_ctx->sap_detected_avoid_ch_ie;
+
+ for (i = 0; i < sizeof(ie_info->channels); i++) {
+ if (ie_info->channels[i] == channel)
+ return true;
+ }
+ return false;
+}
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
/*
* This function randomly pick up an AVAILABLE channel
*/
@@ -1340,9 +1369,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
v_BOOL_t isOutOfRange = VOS_FALSE;
chan_bonding_bitmap channelBitmap;
v_U8_t i = 0;
-#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
- uint8_t j = 0;
-#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
v_U8_t channelID;
tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
tpAniSirGlobal pMac;
@@ -1491,18 +1517,13 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
/* avoid channels on which another MDM AP in MCC mode is detected. */
if (pMac->sap.sap_channel_avoidance
&& sapContext->sap_detected_avoid_ch_ie.present) {
- for( j=0;
- j < sizeof(sapContext->sap_detected_avoid_ch_ie.channels);
- j++) {
- if (sapContext->sap_detected_avoid_ch_ie.channels[j]
- == channelID) {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
- FL("index: %d, Channel = %d, avoided due to "
- "presence of another AP+AP MCC device in same "
- "channel."),
- i, channelID);
- sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
- }
+ if (sap_check_in_avoid_ch_list(sapContext, channelID)) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
+ FL("index: %d, Channel = %d, avoided due to "
+ "presence of another AP+AP MCC device in same "
+ "channel."),
+ i, channelID);
+ sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
}
}
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
diff --git a/Kbuild b/Kbuild
index c9b55cd54470..d343bdea99a3 100755
--- a/Kbuild
+++ b/Kbuild
@@ -1203,6 +1203,7 @@ ifeq ($(CONFIG_IPA_UC_OFFLOAD), 1)
CDEFINES += -DIPA_UC_OFFLOAD
ifeq ($(CONFIG_ARCH_MDM9640), y)
CDEFINES += -DIPA_UC_STA_OFFLOAD
+CDEFINES += -DINTRA_BSS_FWD_OFFLOAD
else
CDEFINES += -DQCA_CONFIG_SMP
endif