Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/drivers/staging/qcacld-2.0/Android.mk b/drivers/staging/qcacld-2.0/Android.mk
- index acaf71fa..c16d390 100644
- --- a/drivers/staging/qcacld-2.0/Android.mk
- +++ b/drivers/staging/qcacld-2.0/Android.mk
- @@ -60,10 +60,14 @@ KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
- KBUILD_OPTIONS += $(WLAN_SELECT)
- KBUILD_OPTIONS += WLAN_OPEN_SOURCE=$(WLAN_OPEN_SOURCE)
- +ifdef CNSS_LOCALE
- +KBUILD_OPTIONS += CNSS_LOCALE=$(CNSS_LOCALE)
- +endif
- +
- include $(CLEAR_VARS)
- LOCAL_MODULE := $(WLAN_CHIPSET)_wlan.ko
- LOCAL_MODULE_KBUILD_NAME := wlan.ko
- -LOCAL_MODULE_TAGS := debug
- +LOCAL_MODULE_TAGS := optional
- LOCAL_MODULE_DEBUG_ENABLE := true
- LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET)
- include $(DLKM_DIR)/AndroidKernelModule.mk
- @@ -85,7 +89,6 @@ endif
- $(shell mkdir -p $(TARGET_OUT)/lib/modules; \
- ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko \
- $(TARGET_OUT)/lib/modules/wlan.ko)
- -$(shell ln -sf /persist/wlan_mac.bin $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin)
- ifeq ($(call is-board-platform-in-list, msm8960),true)
- $(shell ln -sf /firmware/image/bdwlan20.bin $(TARGET_OUT_ETC)/firmware/fakeboar.bin)
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_rx.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_rx.c
- index 8018055..2b08427 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_rx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_rx.c
- @@ -63,7 +63,7 @@
- extern int process_wma_set_command(int sessid, int paramid,
- int sval, int vpdev);
- #endif
- -
- +int dumpEnable;
- /* AR9888v1 WORKAROUND for EV#112367 */
- /* FIX THIS - remove this WAR when the bug is fixed */
- #define PEREGRINE_1_0_ZERO_LEN_PHY_ERR_WAR
- @@ -812,53 +812,11 @@ htt_rx_print_rx_indication(
- msg_word = (u_int32_t *)adf_nbuf_data(rx_ind_msg);
- - adf_os_print("------------------HTT RX IND-----------------------------\n");
- - adf_os_print("alloc idx paddr %x (*vaddr) %d\n",
- - pdev->rx_ring.alloc_idx.paddr,
- - *pdev->rx_ring.alloc_idx.vaddr);
- -
- - adf_os_print("sw_rd_idx msdu_payld %d msdu_desc %d\n",
- - pdev->rx_ring.sw_rd_idx.msdu_payld,
- - pdev->rx_ring.sw_rd_idx.msdu_desc);
- -
- - adf_os_print("dbg_ring_idx %d\n", pdev->rx_ring.dbg_ring_idx);
- -
- - adf_os_print("fill_level %d fill_cnt %d\n",pdev->rx_ring.fill_level,
- - pdev->rx_ring.fill_cnt);
- -
- - adf_os_print("initial msdu_payld %d curr mpdu range %d curr mpdu cnt %d\n",
- - pdev->rx_ring.dbg_initial_msdu_payld,
- - pdev->rx_ring.dbg_mpdu_range,
- - pdev->rx_ring.dbg_mpdu_count);
- -
- - /* Print the RX_IND contents */
- -
- - adf_os_print("peer id %x RV %x FV %x ext_tid %x msg_type %x\n",
- - HTT_RX_IND_PEER_ID_GET(*msg_word),
- - HTT_RX_IND_REL_VALID_GET(*msg_word),
- - HTT_RX_IND_FLUSH_VALID_GET(*msg_word),
- - HTT_RX_IND_EXT_TID_GET(*msg_word),
- - HTT_T2H_MSG_TYPE_GET(*msg_word));
- -
- - adf_os_print("num_mpdu_ranges %x rel_seq_num_end %x rel_seq_num_start %x\n"
- - " flush_seq_num_end %x flush_seq_num_start %x\n",
- - HTT_RX_IND_NUM_MPDU_RANGES_GET(*(msg_word + 1)),
- - HTT_RX_IND_REL_SEQ_NUM_END_GET(*(msg_word + 1)),
- - HTT_RX_IND_REL_SEQ_NUM_START_GET(*(msg_word + 1)),
- - HTT_RX_IND_FLUSH_SEQ_NUM_END_GET(*(msg_word + 1)),
- - HTT_RX_IND_FLUSH_SEQ_NUM_START_GET(*(msg_word + 1)));
- -
- - adf_os_print("fw_rx_desc_bytes %x\n", HTT_RX_IND_FW_RX_DESC_BYTES_GET(
- - *(msg_word + 2 + HTT_RX_PPDU_DESC_SIZE32)));
- /* receive MSDU desc for current frame */
- byte_offset = HTT_ENDIAN_BYTE_IDX_SWAP(HTT_RX_IND_FW_RX_DESC_BYTE_OFFSET +
- pdev->rx_ind_msdu_byte_idx);
- - adf_os_print("msdu byte idx %x msdu desc %x\n", pdev->rx_ind_msdu_byte_idx,
- - HTT_RX_IND_FW_RX_DESC_BYTES_GET(
- - *(msg_word + 2 + HTT_RX_PPDU_DESC_SIZE32)));
- -
- num_mpdu_range = HTT_RX_IND_NUM_MPDU_RANGES_GET(*(msg_word + 1));
- for (mpdu_range = 0; mpdu_range < num_mpdu_range; mpdu_range++) {
- @@ -868,10 +826,7 @@ htt_rx_print_rx_indication(
- htt_rx_ind_mpdu_range_info(
- pdev, rx_ind_msg, mpdu_range, &status, &num_mpdus);
- - adf_os_print("mpdu_range %x status %x num_mpdus %x\n",
- - pdev->rx_ind_msdu_byte_idx, status, num_mpdus);
- }
- - adf_os_print("---------------------------------------------------------\n");
- }
- #endif
- @@ -937,6 +892,39 @@ htt_rx_amsdu_pop_ll(
- * than the descriptor.
- */
- adf_nbuf_pull_head(msdu, HTT_RX_STD_DESC_RESERVATION);
- + if ((dumpEnable == 1) && (msdu->data_len >= 16)){
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "\n%s: skbuff->data dump**************\n", __func__);
- + {
- + char *buf = (char *)msdu->data;
- + int i;
- +
- + for (i=0; (i+15)< 64; i+=16)
- + {
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
- + buf[i],
- + buf[i+1],
- + buf[i+2],
- + buf[i+3],
- + buf[i+4],
- + buf[i+5],
- + buf[i+6],
- + buf[i+7],
- + buf[i+8],
- + buf[i+9],
- + buf[i+10],
- + buf[i+11],
- + buf[i+12],
- + buf[i+13],
- + buf[i+14],
- + buf[i+15]);
- + }
- + }
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "data dump end**************\n");
- + }
- +
- /*
- * Sanity check - confirm the HW is finished filling in the rx data.
- @@ -1361,12 +1349,46 @@ htt_rx_amsdu_rx_in_order_pop_ll(
- msdu_count--;
- + if (dumpEnable == 1){
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "\n%s: skbuff->data dump**************\n", __func__);
- + {
- + char *buf = (char *)msdu->data;
- + int i;
- +
- + for (i=0; (i+15)< 64; i+=16)
- + {
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
- + buf[i],
- + buf[i+1],
- + buf[i+2],
- + buf[i+3],
- + buf[i+4],
- + buf[i+5],
- + buf[i+6],
- + buf[i+7],
- + buf[i+8],
- + buf[i+9],
- + buf[i+10],
- + buf[i+11],
- + buf[i+12],
- + buf[i+13],
- + buf[i+14],
- + buf[i+15]);
- + }
- + }
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "data dump end**************\n");
- + }
- if (adf_os_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) &
- FW_RX_DESC_MIC_ERR_M)) {
- u_int8_t tid =
- HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(*(u_int32_t *)rx_ind_data);
- u_int16_t peer_id =
- HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(*(u_int32_t *)rx_ind_data);
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_INFO,
- + "%s- tid %d peer_id %d\n", __func__, tid, peer_id);
- ol_rx_mic_error_handler(pdev->txrx_pdev, tid, peer_id, rx_desc, msdu);
- htt_rx_desc_frame_free(pdev, msdu);
- @@ -2491,8 +2513,7 @@ htt_rx_attach(struct htt_pdev_t *pdev)
- /* Initialize the Rx refill retry timer */
- adf_os_timer_init(pdev->osdev, &pdev->rx_ring.refill_retry_timer,
- - htt_rx_ring_refill_retry, (void *)pdev,
- - ADF_DEFERRABLE_TIMER);
- + htt_rx_ring_refill_retry, (void *)pdev);
- pdev->rx_ring.fill_cnt = 0;
- #ifdef DEBUG_DMA_DONE
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_t2h.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_t2h.c
- index aebc2cb..16b6a36 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_t2h.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/HTT/htt_t2h.c
- @@ -55,6 +55,11 @@
- #define DEBUG_CREDIT 0
- #endif
- +extern int dumpEnable;
- +void htt_rx_print_rx_indication(
- + adf_nbuf_t rx_ind_msg,
- + htt_pdev_handle pdev);
- +
- static u_int8_t *
- htt_t2h_mac_addr_deswizzle(u_int8_t *tgt_mac_addr, u_int8_t *buffer)
- {
- @@ -177,6 +182,11 @@ htt_t2h_lp_msg_handler(void *context, adf_nbuf_t htt_t2h_msg )
- action =
- HTT_RX_FLUSH_MPDU_STATUS_GET(*(msg_word+1)) == 1 ?
- htt_rx_flush_release : htt_rx_flush_discard;
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "RX_FLUSH: peer_id %x, tid %x, seq_num_start %x,seq_num_end %x, action %d\n",
- + peer_id, tid, seq_num_start, seq_num_end, action);
- +
- ol_rx_flush_handler(
- pdev->txrx_pdev,
- peer_id, tid,
- @@ -227,6 +237,11 @@ htt_t2h_lp_msg_handler(void *context, adf_nbuf_t htt_t2h_msg )
- peer_id = HTT_RX_ADDBA_PEER_ID_GET(*msg_word);
- tid = HTT_RX_ADDBA_TID_GET(*msg_word);
- win_sz = HTT_RX_ADDBA_WIN_SIZE_GET(*msg_word);
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "RX_ADDBA: peer_id %x, tid %x, win_sz %d\n",
- + peer_id, tid, win_sz);
- +
- ol_rx_addba_handler(
- pdev->txrx_pdev, peer_id, tid, win_sz, start_seq_num,
- 0 /* success */);
- @@ -239,6 +254,10 @@ htt_t2h_lp_msg_handler(void *context, adf_nbuf_t htt_t2h_msg )
- peer_id = HTT_RX_DELBA_PEER_ID_GET(*msg_word);
- tid = HTT_RX_DELBA_TID_GET(*msg_word);
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "RX_DelBA: peer_id %x, tid %x\n",
- + peer_id, tid);
- ol_rx_delba_handler(pdev->txrx_pdev, peer_id, tid);
- break;
- }
- @@ -414,6 +433,10 @@ if (adf_os_unlikely(pdev->rx_ring.rx_reset)) {
- msg_word = (u_int32_t *) adf_nbuf_data(htt_t2h_msg);
- msg_type = HTT_T2H_MSG_TYPE_GET(*msg_word);
- + if ((dumpEnable == 1) && (msg_type != 8))
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%s: HTT_msg_type: %d, word1: 0x%02x, word2: 0x%02x \n", __func__, msg_type, *msg_word, *(msg_word+1));
- +
- switch (msg_type) {
- case HTT_T2H_MSG_TYPE_RX_IND:
- {
- @@ -422,6 +445,9 @@ if (adf_os_unlikely(pdev->rx_ring.rx_reset)) {
- u_int16_t peer_id;
- u_int8_t tid;
- + if(dumpEnable == 1)
- + htt_rx_print_rx_indication(htt_t2h_msg, pdev);
- +
- if (adf_os_unlikely(pdev->cfg.is_full_reorder_offload)) {
- adf_os_print("HTT_T2H_MSG_TYPE_RX_IND not supported with full "
- "reorder offload\n");
- @@ -513,6 +539,10 @@ if (adf_os_unlikely(pdev->rx_ring.rx_reset)) {
- seq_num_start = HTT_RX_PN_IND_SEQ_NUM_START_GET(*msg_word);
- seq_num_end = HTT_RX_PN_IND_SEQ_NUM_END_GET(*msg_word);
- pn_ie_cnt = HTT_RX_PN_IND_PN_IE_CNT_GET(*msg_word);
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "RX_PN_IND: peer_id %x, tid %x, seq_start %x,seq_end %x, pn_ie_cnt %d\n",
- + peer_id, tid, seq_num_start, seq_num_end, pn_ie_cnt);
- msg_word++;
- /*Third dword*/
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TLSHIM/tl_shim.c
- index bf16c03..712372f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TLSHIM/tl_shim.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TLSHIM/tl_shim.c
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -1143,7 +1143,7 @@ adf_nbuf_t WLANTL_SendSTA_DataFrame(void *vos_ctx, u_int8_t sta_id,
- }
- if (vos_is_load_unload_in_progress(VOS_MODULE_ID_TL, NULL)) {
- - TLSHIM_LOGW("%s: Driver load/unload in progress", __func__);
- + TLSHIM_LOGP("%s: Driver load/unload in progress", __func__);
- return skb;
- }
- /*
- @@ -2035,20 +2035,6 @@ void *tl_shim_get_vdev_by_sta_id(void *vos_context, uint8_t sta_id)
- return peer->vdev;
- }
- -void
- -WLANTL_PauseUnPauseQs(void *vos_context, v_BOOL_t flag)
- -{
- - ol_txrx_pdev_handle pdev = vos_get_context(VOS_MODULE_ID_TXRX,
- - vos_context);
- -
- - if (true == flag)
- - wdi_in_pdev_pause(pdev,
- - OL_TXQ_PAUSE_REASON_VDEV_SUSPEND);
- - else
- - wdi_in_pdev_unpause(pdev,
- - OL_TXQ_PAUSE_REASON_VDEV_SUSPEND);
- -}
- -
- #ifdef QCA_LL_TX_FLOW_CT
- /*=============================================================================
- FUNCTION WLANTL_GetTxResource
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx.c
- index 5fe67c4..f074ba4 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx.c
- @@ -72,6 +72,13 @@
- vdev->osif_rx(vdev->osif_dev, msdus)
- #endif /* OSIF_NEED_RX_PEER_ID */
- +extern int dumpEnable;
- +
- +void ol_rx_reorder_display(
- + struct ol_txrx_pdev_t *pdev,
- + struct ol_txrx_peer_t *peer,
- + unsigned tid);
- +
- #ifdef HTT_RX_RESTORE
- static void ol_rx_restore_handler(struct work_struct *htt_rx)
- @@ -1075,7 +1082,7 @@ ol_rx_in_order_indication_handler(
- if (peer) {
- vdev = peer->vdev;
- } else {
- - TXRX_PRINT(TXRX_PRINT_LEVEL_INFO2,
- + TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: Couldn't find peer from ID 0x%x\n", __FUNCTION__,
- peer_id);
- while (head_msdu) {
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_defrag.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_defrag.c
- index cdbcc76..5d6fbef 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_defrag.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_defrag.c
- @@ -455,8 +455,9 @@ ol_rx_defrag_waitlist_remove(
- rx_reorder->defrag_waitlist_elem.tqe_next = NULL;
- rx_reorder->defrag_waitlist_elem.tqe_prev = NULL;
- - } else if (rx_reorder->defrag_waitlist_elem.tqe_next != NULL) {
- - TXRX_PRINT(TXRX_PRINT_LEVEL_FATAL_ERR, "waitlist->tqe_prv = NULL\n");
- + } else if (rx_reorder->defrag_waitlist_elem.tqe_next != NULL){
- + TXRX_PRINT(TXRX_PRINT_LEVEL_FATAL_ERR,
- + "waitlist->tqe_prv = NULL & tqe->next is not NULL\n");
- VOS_ASSERT(0);
- rx_reorder->defrag_waitlist_elem.tqe_next = NULL;
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
- index f5da6d4..74b3b9e 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
- @@ -45,7 +45,7 @@
- #include <ol_rx_reorder_timeout.h> /* OL_RX_REORDER_TIMEOUT_REMOVE, etc. */
- #include <ol_rx_reorder.h>
- #include <ol_rx_defrag.h>
- -
- +extern int dumpEnable;
- /*=== data types and defines ===*/
- #define OL_RX_REORDER_ROUND_PWR2(value) g_log2ceil[value]
- @@ -144,6 +144,40 @@ ol_rx_reorder_seq_num_check(
- }
- void
- +ol_rx_reorder_display(
- + struct ol_txrx_pdev_t *pdev,
- + struct ol_txrx_peer_t *peer,
- + unsigned tid)
- +{
- + adf_nbuf_t head_msdu;
- + int idx = 0, msdu_cnt=0;
- + struct ol_rx_reorder_array_elem_t *rx_reorder_array_elem = NULL;
- +
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%s %d, display reorder buffer info for peer-id %d,tid %d\n",
- + __func__, __LINE__, peer->peer_ids[0], tid);
- +
- + for(; idx<64; idx++)
- + {
- + msdu_cnt = 0;
- + rx_reorder_array_elem = &peer->tids_rx_reorder[tid].array[idx];
- + head_msdu = rx_reorder_array_elem->head;
- + /*while (head_msdu != NULL) {
- + msdu_cnt++;
- + head_msdu = adf_nbuf_next(head_msdu);
- + }
- + */
- + if(head_msdu != NULL) msdu_cnt++;
- +
- + if (msdu_cnt !=0)
- + printk("idx %d, MSDU_cnt %d\n", idx, msdu_cnt);
- + }
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "display reorder buffer end for peer-id %d, tid %d\n",peer->peer_ids[0], tid);
- +
- +}
- +
- +void
- ol_rx_reorder_store(
- struct ol_txrx_pdev_t *pdev,
- struct ol_txrx_peer_t *peer,
- @@ -194,7 +228,9 @@ ol_rx_reorder_release(
- OL_RX_REORDER_PTR_CHECK(head_msdu) {
- OL_RX_REORDER_MPDU_CNT_DECR(&peer->tids_rx_reorder[tid], 1);
- }
- -
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%s %d: start_idx %d end_idx %d", __func__, __LINE__, idx_start, idx_end);
- idx = (idx_start + 1);
- OL_RX_REORDER_IDX_WRAP(idx, win_sz, win_sz_mask);
- while (idx != idx_end) {
- @@ -280,7 +316,9 @@ ol_rx_reorder_flush(
- idx_start &= win_sz_mask;
- idx_end &= win_sz_mask;
- -
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%s %d: start_idx %d end_idx %d", __func__, __LINE__, idx_start, idx_end);
- do {
- rx_reorder_array_elem =
- &peer->tids_rx_reorder[tid].array[idx_start];
- @@ -551,6 +589,10 @@ ol_rx_pn_ind_handler(
- seq_num_start &= win_sz_mask;
- seq_num_end &= win_sz_mask;
- seq_num = seq_num_start;
- + if(dumpEnable == 1)
- + VOS_TRACE(VOS_MODULE_ID_TXRX, VOS_TRACE_LEVEL_ERROR,
- + "%s %d seq_start %d, seq_end %d, seq_num %d, pn_ie_cnt %d", __func__,
- + __LINE__,seq_num_start,seq_num_end,seq_num, pn_ie_cnt);
- do {
- rx_reorder_array_elem =
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder_timeout.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder_timeout.c
- index a1deb5c..ea7e6ec 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder_timeout.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_rx_reorder_timeout.c
- @@ -188,7 +188,7 @@ ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev)
- /* init the per-AC timers */
- adf_os_timer_init(
- pdev->osdev, &rx_reorder_timeout_ac->timer,
- - ol_rx_reorder_timeout, rx_reorder_timeout_ac, ADF_DEFERRABLE_TIMER);
- + ol_rx_reorder_timeout, rx_reorder_timeout_ac);
- /* init the virtual timer list */
- TAILQ_INIT(&rx_reorder_timeout_ac->virtual_timer_list);
- rx_reorder_timeout_ac->pdev = pdev;
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.c
- index 7e469e4..dc3c73f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.c
- @@ -114,30 +114,6 @@ ol_tx_ll(ol_txrx_vdev_handle vdev, adf_nbuf_t msdu_list)
- #define OL_TX_VDEV_PAUSE_QUEUE_SEND_MARGIN 400
- #define OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS 5
- -
- -/**
- - * ol_tx_vdev_ll_pause_start_timer() - Start ll-q pause timer for specific virtual device
- - * @vdev: the virtual device
- - *
- - * When system comes out of suspend, it is necessary to start the timer
- - * which will ensure to pull out all the queued packets after expiry.
- - * This function restarts the ll-pause timer, for the specific vdev device.
- - *
- - *
- - * Return: None
- - */
- -void
- -ol_tx_vdev_ll_pause_start_timer(struct ol_txrx_vdev_t *vdev)
- -{
- - adf_os_spin_lock_bh(&vdev->ll_pause.mutex);
- - if (vdev->ll_pause.txq.depth) {
- - adf_os_timer_cancel(&vdev->ll_pause.timer);
- - adf_os_timer_start(&vdev->ll_pause.timer,
- - OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS);
- - }
- - adf_os_spin_unlock_bh(&vdev->ll_pause.mutex);
- -}
- -
- static void
- ol_tx_vdev_ll_pause_queue_send_base(struct ol_txrx_vdev_t *vdev)
- {
- @@ -225,8 +201,8 @@ ol_tx_vdev_pause_queue_append(
- adf_nbuf_set_next(vdev->ll_pause.txq.tail, NULL);
- }
- - adf_os_timer_cancel(&vdev->ll_pause.timer);
- if (start_timer) {
- + adf_os_timer_cancel(&vdev->ll_pause.timer);
- adf_os_timer_start(
- &vdev->ll_pause.timer, OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS);
- }
- @@ -261,10 +237,7 @@ ol_tx_ll_queue(ol_txrx_vdev_handle vdev, adf_nbuf_t msdu_list)
- return msdu_list;
- }
- }
- - if (paused_reason & OL_TXQ_PAUSE_REASON_VDEV_SUSPEND)
- - msdu_list = ol_tx_vdev_pause_queue_append(vdev, msdu_list, 0);
- - else
- - msdu_list = ol_tx_vdev_pause_queue_append(vdev, msdu_list, 1);
- + msdu_list = ol_tx_vdev_pause_queue_append(vdev, msdu_list, 1);
- } else {
- if (vdev->ll_pause.txq.depth > 0 ||
- vdev->pdev->tx_throttle.current_throttle_level !=
- @@ -382,16 +355,16 @@ ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev)
- void ol_tx_vdev_ll_pause_queue_send(void *context)
- {
- +#ifdef QCA_SUPPORT_TXRX_VDEV_LL_TXQ
- struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *) context;
- -#ifdef QCA_SUPPORT_TXRX_VDEV_LL_TXQ
- if (vdev->pdev->tx_throttle.current_throttle_level != THROTTLE_LEVEL_0 &&
- vdev->pdev->tx_throttle.current_throttle_phase == THROTTLE_PHASE_OFF) {
- return;
- }
- -#endif
- ol_tx_vdev_ll_pause_queue_send_base(vdev);
- +#endif
- }
- static inline int
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.h b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.h
- index f099b1a..e53439f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.h
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx.h
- @@ -73,20 +73,6 @@ ol_tx_reinject(struct ol_txrx_vdev_t *vdev, adf_nbuf_t msdu, u_int16_t peer_id);
- void
- ol_txrx_mgmt_tx_complete(void *ctxt, adf_nbuf_t netbuf, int err);
- -/**
- - * ol_tx_vdev_ll_pause_start_timer() - Start ll-q pause timer for specific virtual device
- - * @vdev: the virtual device
- - *
- - * When system comes out of suspend, it is necessary to start the timer
- - * which will ensure to pull out all the queued packets after expiry.
- - * This function restarts the ll-pause timer, for the specific vdev device.
- - *
- - *
- - * Return: None
- - */
- -void
- -ol_tx_vdev_ll_pause_start_timer(struct ol_txrx_vdev_t *vdev);
- -
- void
- ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev);
- #endif /* _OL_TX__H_ */
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx_queue.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
- index 0936b05..65723af 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
- @@ -458,7 +458,7 @@ ol_txrx_throttle_pause(ol_txrx_pdev_handle pdev)
- pdev->tx_throttle.is_paused = TRUE;
- adf_os_spin_unlock_bh(&pdev->tx_throttle.mutex);
- #endif
- - ol_txrx_pdev_pause(pdev, 0);
- + ol_txrx_pdev_pause(pdev);
- }
- void
- @@ -475,57 +475,33 @@ ol_txrx_throttle_unpause(ol_txrx_pdev_handle pdev)
- pdev->tx_throttle.is_paused = FALSE;
- adf_os_spin_unlock_bh(&pdev->tx_throttle.mutex);
- #endif
- - ol_txrx_pdev_unpause(pdev, 0);
- + ol_txrx_pdev_unpause(pdev);
- }
- -#endif /* defined(CONFIG_HL_SUPPORT) */
- -#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- -/**
- - * ol_txrx_pdev_pause() - Suspend all tx data for the specified physical device.
- - * @data_pdev: the physical device being paused.
- - * @reason: pause reason.
- - *
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- - * In some systems it is necessary to be able to temporarily
- - * suspend all WLAN traffic, e.g. to allow another device such as bluetooth
- - * to temporarily have exclusive access to shared RF chain resources.
- - * This function suspends tx traffic within the specified physical device.
- - *
- - *
- - * Return: None
- - */
- void
- -ol_txrx_pdev_pause(ol_txrx_pdev_handle pdev, u_int32_t reason)
- +ol_txrx_pdev_pause(ol_txrx_pdev_handle pdev)
- {
- - struct ol_txrx_vdev_t *vdev = NULL, *tmp;
- + struct ol_txrx_vdev_t *vdev = NULL, *tmp;
- - TAILQ_FOREACH_SAFE(vdev, &pdev->vdev_list, vdev_list_elem, tmp) {
- - ol_txrx_vdev_pause(vdev, reason);
- - }
- + TAILQ_FOREACH_SAFE(vdev, &pdev->vdev_list, vdev_list_elem, tmp) {
- + ol_txrx_vdev_pause(vdev, 0);
- + }
- }
- -/**
- - * ol_txrx_pdev_unpause() - Resume tx for the specified physical device..
- - * @data_pdev: the physical device being paused.
- - * @reason: pause reason.
- - *
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- - *
- - *
- - * Return: None
- - */
- void
- -ol_txrx_pdev_unpause(ol_txrx_pdev_handle pdev, u_int32_t reason)
- +ol_txrx_pdev_unpause(ol_txrx_pdev_handle pdev)
- {
- - struct ol_txrx_vdev_t *vdev = NULL, *tmp;
- + struct ol_txrx_vdev_t *vdev = NULL, *tmp;
- - TAILQ_FOREACH_SAFE(vdev, &pdev->vdev_list, vdev_list_elem, tmp) {
- - ol_txrx_vdev_unpause(vdev, reason);
- - }
- + TAILQ_FOREACH_SAFE(vdev, &pdev->vdev_list, vdev_list_elem, tmp) {
- + ol_txrx_vdev_unpause(vdev, 0);
- + }
- }
- +#endif /* defined(CONFIG_HL_SUPPORT) */
- +
- +#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- +
- void
- ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, u_int32_t reason)
- {
- @@ -578,11 +554,7 @@ ol_txrx_vdev_unpause(ol_txrx_vdev_handle vdev, u_int32_t reason)
- if (vdev->ll_pause.paused_reason & reason)
- {
- vdev->ll_pause.paused_reason &= ~reason;
- - if (reason == OL_TXQ_PAUSE_REASON_VDEV_SUSPEND) {
- - adf_os_spin_unlock_bh(&vdev->ll_pause.mutex);
- - ol_tx_vdev_ll_pause_start_timer(vdev);
- - }
- - else if (!vdev->ll_pause.paused_reason) {
- + if (!vdev->ll_pause.paused_reason) {
- adf_os_spin_unlock_bh(&vdev->ll_pause.mutex);
- ol_tx_vdev_ll_pause_queue_send(vdev);
- } else {
- @@ -780,14 +752,14 @@ void ol_tx_throttle_init(struct ol_txrx_pdev_t *pdev)
- pdev->osdev,
- &pdev->tx_throttle.phase_timer,
- ol_tx_pdev_throttle_phase_timer,
- - pdev, ADF_DEFERRABLE_TIMER);
- + pdev);
- #ifdef QCA_SUPPORT_TXRX_VDEV_LL_TXQ
- adf_os_timer_init(
- pdev->osdev,
- &pdev->tx_throttle.tx_timer,
- ol_tx_pdev_throttle_tx_timer,
- - pdev, ADF_DEFERRABLE_TIMER);
- + pdev);
- #endif
- pdev->tx_throttle.tx_threshold = THROTTLE_TX_THRESHOLD;
- diff --git a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_txrx.c b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_txrx.c
- index 90efd30..ed1eada 100644
- --- a/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_txrx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/CLD_TXRX/TXRX/ol_txrx.c
- @@ -884,7 +884,7 @@ ol_txrx_vdev_attach(
- pdev->osdev,
- &vdev->ll_pause.timer,
- ol_tx_vdev_ll_pause_queue_send,
- - vdev, ADF_DEFERRABLE_TIMER);
- + vdev);
- adf_os_atomic_init(&vdev->os_q_paused);
- adf_os_atomic_set(&vdev->os_q_paused, 0);
- vdev->tx_fl_lwm = 0;
- diff --git a/drivers/staging/qcacld-2.0/CORE/EPPING/src/epping_txrx.c b/drivers/staging/qcacld-2.0/CORE/EPPING/src/epping_txrx.c
- index 44fe268..678d58e 100644
- --- a/drivers/staging/qcacld-2.0/CORE/EPPING/src/epping_txrx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/EPPING/src/epping_txrx.c
- @@ -374,7 +374,7 @@ epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
- adf_nbuf_queue_init(&pAdapter->nodrop_queue);
- pAdapter->epping_timer_state = EPPING_TX_TIMER_STOPPED;
- adf_os_timer_init(epping_get_adf_ctx(), &pAdapter->epping_timer,
- - epping_timer_expire, dev, ADF_DEFERRABLE_TIMER);
- + epping_timer_expire, dev);
- dev->type = ARPHRD_IEEE80211;
- dev->netdev_ops = &epping_drv_ops;
- dev->watchdog_timeo = 5 * HZ; /* XXX */
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_cfg.h b/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_cfg.h
- index 6001834..e25b982 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_cfg.h
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_cfg.h
- @@ -1226,11 +1226,6 @@ typedef enum
- #define CFG_ROAM_RESCAN_RSSI_DIFF_MAX (100)
- #define CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT (5)
- -#define CFG_DROPPED_PKT_DISCONNECT_TH_NAME "gDroppedPktDisconnectTh"
- -#define CFG_DROPPED_PKT_DISCONNECT_TH_MIN (48)
- -#define CFG_DROPPED_PKT_DISCONNECT_TH_MAX (256)
- -#define CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT (96)
- -
- /*
- * This parameter is the RSSI diff above neighbor lookup threshold, when
- * opportunistic scan should be triggered.
- @@ -1587,13 +1582,13 @@ typedef enum
- #define CFG_ENABLE_FW_LOG_TYPE_DEFAULT ( 3 )
- /* gFwDebugLogLevel takes values from enum DBGLOG_LOG_LVL,
- - * make default value as DBGLOG_WARN to enable error and
- - * warning logs by default.
- + * make default value as DBGLOG_ERR to enable error logs by
- + * default.
- */
- #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL "gFwDebugLogLevel"
- #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MIN ( 0 )
- #define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MAX ( 255 )
- -#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_DEFAULT ( 4 )
- +#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_DEFAULT ( 5 )
- /* For valid values of log levels check enum DBGLOG_LOG_LVL and
- * for valid values of module ids check enum WLAN_MODULE_ID.
- @@ -3452,7 +3447,6 @@ typedef struct
- bool enable_fw_hash_check;
- #endif
- uint16_t p2p_listen_defer_interval;
- - uint16_t pkt_err_disconn_th;
- } hdd_config_t;
- #ifdef WLAN_FEATURE_MBSSID
- @@ -3575,6 +3569,9 @@ static __inline unsigned long utilMin( unsigned long a, unsigned long b )
- -------------------------------------------------------------------------*/
- VOS_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx);
- VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx);
- +VOS_STATUS hdd_generate_random_mac_from_serialno(char *serialNo,
- + int serialength, char *computedMac);
- +VOS_STATUS hdd_update_mac_serial(hdd_context_t *pHddCtx);
- VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx );
- VOS_STATUS hdd_set_sme_chan_list(hdd_context_t *hdd_ctx);
- v_BOOL_t hdd_update_config_dat ( hdd_context_t *pHddCtx );
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_tdls.h b/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_tdls.h
- index 3c74f70..480a0c1 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_tdls.h
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_tdls.h
- @@ -226,6 +226,7 @@ typedef struct _hddTdlsPeer_t {
- tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
- tANI_U8 supported_oper_classes_len;
- tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
- + vos_timer_t initiatorWaitTimeoutTimer;
- tANI_BOOLEAN isForcedPeer;
- tANI_U8 op_class_for_pref_off_chan;
- tANI_U8 pref_off_chan_num;
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.c
- index 6eedd4c..256f94c 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.c
- @@ -512,7 +512,6 @@ void hdd_SendFTEvent(hdd_adapter_t *pAdapter)
- if (auth_resp_len == 0)
- {
- hddLog(LOGE, "%s: AuthRsp FTIES is of length 0", __func__);
- - kfree(buff);
- return;
- }
- @@ -1408,9 +1407,10 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
- /* HDD has initiated disconnect, do not send connect result indication
- * to kernel as it will be handled by __cfg80211_disconnect.
- */
- - if(( eConnectionState_Disconnecting == pHddStaCtx->conn_info.connState) &&
- - (( eCSR_ROAM_RESULT_ASSOCIATED == roamResult) ||
- - ( eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus)) )
- + if(((eConnectionState_Disconnecting == pHddStaCtx->conn_info.connState) ||
- + (eConnectionState_NotConnected == pHddStaCtx->conn_info.connState)) &&
- + ((eCSR_ROAM_RESULT_ASSOCIATED == roamResult) ||
- + (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus)))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- FL(" Disconnect from HDD in progress "));
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg.c
- index 0c796e9..f537bf6 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg.c
- @@ -48,6 +48,8 @@
- ------------------------------------------------------------------------*/
- +#include <linux/of.h>
- +#include <linux/of_address.h>
- #include <linux/firmware.h>
- #include <linux/string.h>
- #include <wlan_hdd_includes.h>
- @@ -59,8 +61,25 @@
- #include <csrApi.h>
- #include <pmcApi.h>
- #include <wlan_hdd_misc.h>
- +#include <crypto/md5.h>
- +#include <crypto/hash.h>
- #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
- +
- +#ifdef MOTO_UTAGS_MAC
- +#define WIFI_MAC_BOOTARG "androidboot.wifimacaddr="
- +#define DEVICE_SERIALNO_BOOTARG "androidboot.serialno="
- +#define MACSTRLEN 12
- +#define MACSTRCOLON 58
- +#define MACADDRESSUSED 1
- +#endif
- +
- +
- +struct sdesc {
- + struct shash_desc shash;
- + char ctx[];
- +};
- +
- static void
- cbNotifySetRoamPrefer5GHz(hdd_context_t *pHddCtx, unsigned long NotifyId)
- {
- @@ -3922,13 +3941,6 @@ REG_TABLE_ENTRY g_registry_table[] =
- CFG_INFORM_BSS_RSSI_RAW_DEFAULT,
- CFG_INFORM_BSS_RSSI_RAW_MIN,
- CFG_INFORM_BSS_RSSI_RAW_MAX),
- -
- - REG_VARIABLE(CFG_DROPPED_PKT_DISCONNECT_TH_NAME, WLAN_PARAM_Integer,
- - hdd_config_t, pkt_err_disconn_th,
- - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- - CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT,
- - CFG_DROPPED_PKT_DISCONNECT_TH_MIN,
- - CFG_DROPPED_PKT_DISCONNECT_TH_MAX),
- };
- #ifdef WLAN_FEATURE_MBSSID
- @@ -4741,18 +4753,31 @@ static void update_mac_from_string(hdd_context_t *pHddCtx, tCfgIniEntry *macTabl
- */
- VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
- {
- - int status, i = 0;
- +#ifndef MOTO_UTAGS_MAC
- const struct firmware *fw = NULL;
- - char *line, *buffer = NULL;
- - char *name, *value;
- + char *line = NULL;
- + int status, i = 0;
- +#else
- + int len = 0;
- + int iteration = 0;
- +
- + char *bufferPtr = NULL;
- + char buffer_temp[MACSTRLEN];
- + const char *cmd_line = NULL;
- + struct device_node *chosen_node = NULL;
- +#endif
- +
- + char *buffer = NULL;
- tCfgIniEntry macTable[VOS_MAX_CONCURRENCY_PERSONA];
- tSirMacAddr customMacAddr;
- -
- VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
- memset(macTable, 0, sizeof(macTable));
- - status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
- + /*Implemenation of QCOM is to read the MAC address from the predefined*/
- + /*location where WLAN MMAC File have the MAC Address */
- +#ifndef MOTO_UTAGS_MAC
- + status = request_firmware(&fw, WLAN_MAC_FILE, pHddCtx->parent_dev);
- if (status)
- {
- hddLog(VOS_TRACE_LEVEL_WARN, "%s: request_firmware failed %d",
- @@ -4766,9 +4791,41 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
- vos_status = VOS_STATUS_E_INVAL;
- goto config_exit;
- }
- -
- buffer = (char *)fw->data;
- +#else
- + /* Read MACs from bootparams. */
- + chosen_node = of_find_node_by_name(NULL, "chosen");
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get chosen node \n", __func__);
- + if (!chosen_node)
- + {
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get chosen node read failed \n", __func__);
- + goto config_exit;
- + } else {
- + cmd_line = of_get_property(chosen_node, "bootargs", &len);
- +
- + if (!cmd_line || len <= 0) {
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get wlan MACs bootargs failed \n", __func__);
- + vos_status = VOS_STATUS_E_FAILURE;
- + goto config_exit;
- + } else {
- + buffer = strstr(cmd_line, WIFI_MAC_BOOTARG);
- + if (buffer == NULL) {
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: " WIFI_MAC_BOOTARG " bootarg cmd line is null", __func__);
- + vos_status = VOS_STATUS_E_FAILURE;
- + goto config_exit;
- + } else {
- + buffer += strlen(WIFI_MAC_BOOTARG);
- + bufferPtr = buffer;
- + }
- + }
- + }
- +#endif
- +#ifndef MOTO_UTAGS_MAC
- /* data format:
- * Intf0MacAddress=00AA00BB00CC
- * Intf1MacAddress=00AA00BB00CD
- @@ -4813,19 +4870,186 @@ VOS_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
- vos_status = VOS_STATUS_E_INVAL;
- goto config_exit;
- }
- -
- update_mac_from_string(pHddCtx, &macTable[0], i);
- + vos_mem_copy(&customMacAddr,
- + &pHddCtx->cfg_ini->intfMacAddr[0].bytes[0],
- + sizeof(tSirMacAddr));
- +#else
- + /* Mac address data format used by qcom:
- + * Intf0MacAddress=00AA00BB00CC
- + * Intf1MacAddress=00AA00BB00CD
- + * xxxxxxxxxxxxxxxxxxxxxxxxxxxx
- + * From bootarg we need to strip off : from macaddress
- + */
- + for (iteration = 0; iteration < MACSTRLEN; iteration++) {
- + if (*bufferPtr != MACSTRCOLON) {
- + buffer_temp[iteration] = *bufferPtr;
- + } else {
- + iteration = iteration - 1;
- + }
- + bufferPtr++;
- + }
- + /* Mac address data format used by qcom:
- + * Intf0MacAddress used for 1 macaddress
- + * if gp2pdeviceAdmistered is set to 1
- + * if s020deviceAdmisnited is set to 0
- + * it will use Intf1MacAddress for P2P seprately
- + * Motorola decided to use gp2pdeviceAdmistered = 1 i.e use
- + * locally gerated bin MAC addr for P2P
- + */
- + macTable[0].name = "Intf0MacAddress";
- + macTable[0].value = &buffer_temp[0];
- + update_mac_from_string(pHddCtx, &macTable[0], MACADDRESSUSED);
- vos_mem_copy(&customMacAddr,
- &pHddCtx->cfg_ini->intfMacAddr[0].bytes[0],
- sizeof(tSirMacAddr));
- +#endif
- sme_SetCustomMacAddr(customMacAddr);
- config_exit:
- +#ifndef MOTO_UTAGS_MAC
- release_firmware(fw);
- +#endif
- return vos_status;
- }
- +VOS_STATUS hdd_update_mac_serial(hdd_context_t *pHddCtx)
- +{
- + VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
- +
- + int len = 0;
- + int serialnoLen = 0;
- +
- + char *buffer = NULL;
- + char *bufferPtr = NULL;
- + char *computedMac = NULL;
- + const char *cmd_line = NULL;
- +
- + struct device_node *chosen_node = NULL;
- + computedMac = (char*)vos_mem_malloc(VOS_MAC_ADDR_SIZE);
- +
- + chosen_node = of_find_node_by_name(NULL, "chosen");
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get chosen node \n", __func__);
- +
- + if (!chosen_node)
- + {
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get chosen node read failed \n", __func__);
- + goto config_exit;
- + } else {
- + cmd_line = of_get_property(chosen_node, "bootargs", &len);
- + if (!cmd_line || len <= 0) {
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: get the barcode bootargs failed \n", __func__);
- + vos_status = VOS_STATUS_E_FAILURE;
- + goto config_exit;
- + } else {
- + buffer = strstr(cmd_line, DEVICE_SERIALNO_BOOTARG);
- + if (buffer == NULL) {
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: " DEVICE_SERIALNO_BOOTARG" not present cmd line argc",
- + __func__);
- + vos_status = VOS_STATUS_E_FAILURE;
- + goto config_exit;
- + } else {
- + buffer += strlen(DEVICE_SERIALNO_BOOTARG);
- + bufferPtr = buffer;
- + while (*bufferPtr != ' ') {
- + bufferPtr++;
- + serialnoLen = serialnoLen + 1;
- + }
- + }
- + }
- + }
- + /*Data have been read from boot serial no */
- + /*Now generate random unique the 6 byte string */
- + if (hdd_generate_random_mac_from_serialno(buffer, serialnoLen,
- + computedMac)
- + != VOS_STATUS_SUCCESS)
- + {
- + vos_status = VOS_STATUS_E_FAILURE;
- + goto config_exit;
- + }
- +
- + vos_mem_copy((v_U8_t *)&pHddCtx->cfg_ini->intfMacAddr[0].bytes[0],
- + (v_U8_t *)computedMac, VOS_MAC_ADDR_SIZE);
- +
- +config_exit:
- + vos_mem_free(computedMac);
- + return vos_status;
- +}
- +
- +VOS_STATUS hdd_generate_random_mac_from_serialno(char *serialNo, int serialnoLen,
- + char *macAddr)
- +{
- + unsigned int size;
- + struct crypto_shash *md5;
- + struct sdesc *sdescmd5;
- + char *hashBuf = NULL;
- +
- + VOS_STATUS cryptoStatus = VOS_STATUS_SUCCESS;
- + hashBuf = (char*)vos_mem_malloc(16);
- +
- + /*Motorola OUI*/
- + macAddr[0] = 0xA4;
- + macAddr[1] = 0x70;
- + macAddr[2] = 0xd6;
- +
- + md5 = crypto_alloc_shash("md5", 0, 0);
- + if (IS_ERR(md5)) {
- + cryptoStatus = VOS_STATUS_E_FAILURE;
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: Crypto md5 allocation error \n", __func__);
- + vos_mem_free(hashBuf);
- + return VOS_STATUS_E_FAILURE;
- + }
- +
- + size = sizeof(struct shash_desc) + crypto_shash_descsize(md5);
- +
- + sdescmd5 = kmalloc(size, GFP_KERNEL);
- + if (!sdescmd5) {
- + cryptoStatus = VOS_STATUS_E_FAILURE;
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%s: Memory allocationn error \n", __func__);
- + goto crypto_hash_err;
- + }
- +
- + sdescmd5->shash.tfm = md5;
- + sdescmd5->shash.flags = 0x0;
- +
- + if (crypto_shash_init(&sdescmd5->shash)) {
- + cryptoStatus = VOS_STATUS_E_FAILURE;
- + goto crypto_hash_err;
- + }
- +
- + if (crypto_shash_update(&sdescmd5->shash, serialNo, serialnoLen)) {
- + cryptoStatus = VOS_STATUS_E_FAILURE;
- + goto crypto_hash_err;
- + }
- +
- + if (crypto_shash_final(&sdescmd5->shash, &hashBuf[0])) {
- + cryptoStatus = VOS_STATUS_E_FAILURE;
- + goto crypto_hash_err;
- + }
- +
- + macAddr[3] = hashBuf[0];
- + macAddr[4] = hashBuf[1];
- + macAddr[5] = hashBuf[2];
- +
- + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + "%X:%X:%X:%X:%X:%X MAC genrated from serial number \n", macAddr[0],
- + macAddr[1], macAddr[2], macAddr[3],
- + macAddr[4], macAddr[5]);
- +crypto_hash_err:
- + vos_mem_free(hashBuf);
- + crypto_free_shash(md5);
- + kfree(sdescmd5);
- +
- + return cryptoStatus;
- +}
- +
- static VOS_STATUS hdd_apply_cfg_ini( hdd_context_t *pHddCtx, tCfgIniEntry* iniTable, unsigned long entries)
- {
- VOS_STATUS match_status = VOS_STATUS_E_FAILURE;
- @@ -6319,9 +6543,6 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
- pHddCtx->cfg_ini->isRoamOffloadEnabled;
- #endif
- - smeConfig->csrConfig.pkt_err_disconn_th =
- - pHddCtx->cfg_ini->pkt_err_disconn_th;
- -
- halStatus = sme_UpdateConfig( pHddCtx->hHal, smeConfig);
- if ( !HAL_STATUS_SUCCESS( halStatus ) )
- {
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg80211.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg80211.c
- index d50fce5..bee3cb8 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg80211.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg80211.c
- @@ -6497,8 +6497,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
- pSapEventCallback = hdd_hostapd_SAPEventCB;
- - (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->dfs_cac_block_tx = VOS_TRUE;
- -
- status = WLANSAP_StartBss(
- #ifdef WLAN_FEATURE_MBSSID
- WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter),
- @@ -11167,7 +11165,6 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
- int status;
- hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- - eConnectionState connState;
- #ifdef FEATURE_WLAN_TDLS
- tANI_U8 staIdx;
- #endif
- @@ -11194,8 +11191,6 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
- eCsrRoamDisconnectReason reasonCode =
- eCSR_DISCONNECT_REASON_UNSPECIFIED;
- hdd_scaninfo_t *pScanInfo;
- -
- - connState = pHddStaCtx->conn_info.connState;
- switch (reason) {
- case WLAN_REASON_MIC_FAILURE:
- reasonCode = eCSR_DISCONNECT_REASON_MIC_ERROR;
- @@ -11236,6 +11231,7 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
- eCSR_SCAN_ABORT_DEFAULT);
- }
- + wlan_hdd_cleanup_remain_on_channel_ctx(pAdapter);
- #ifdef FEATURE_WLAN_TDLS
- /* First clean up the tdls peers if any */
- for (staIdx = 0 ; staIdx < pHddCtx->max_num_tdls_sta; staIdx++) {
- @@ -11258,7 +11254,6 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
- status = wlan_hdd_disconnect(pAdapter, reasonCode);
- if (0 != status) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("failure, returned %d"), status);
- - pHddStaCtx->conn_info.connState = connState;
- return -EINVAL;
- }
- } else {
- @@ -13007,7 +13002,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
- tpSirPNOScanReq pPnoRequest = NULL;
- hdd_context_t *pHddCtx;
- tHalHandle hHal;
- - v_U32_t i, indx, num_ch, tempInterval, j;
- + v_U32_t i, indx, num_ch, j;
- u8 valid_ch[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0};
- u8 channels_allowed[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0};
- v_U32_t num_channels_allowed = WNI_CFG_VALID_CHANNEL_LIST_LEN;
- @@ -13193,7 +13188,8 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
- memcpy(&pPnoRequest->p5GProbeTemplate, request->ie,
- pPnoRequest->us5GProbeTemplateLen);
- }
- -
- + //BEGIN MOT a19110 IKDREL3KK-2175 PNO enhancement
- +#if 0
- /* Driver gets only one time interval which is hard coded in
- * supplicant for 10000ms. Taking power consumption into account 6 timers
- * will be used, Timer value is increased exponentially i.e 10,20,40,
- @@ -13222,6 +13218,13 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
- }
- //Repeat last timer until pno disabled.
- pPnoRequest->scanTimers.aTimerValues[i-1].uTimerRepeat = 0;
- +#endif
- + pPnoRequest->scanTimers.ucScanTimersCount = 2;
- + pPnoRequest->scanTimers.aTimerValues[0].uTimerRepeat = 7;
- + pPnoRequest->scanTimers.aTimerValues[0].uTimerValue = 45;
- + pPnoRequest->scanTimers.aTimerValues[1].uTimerRepeat = 0;
- + pPnoRequest->scanTimers.aTimerValues[1].uTimerValue = 480;
- + //END IKDREL3KK-2175
- pPnoRequest->modePNO = SIR_PNO_MODE_IMMEDIATE;
- @@ -13846,6 +13849,21 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
- {
- tANI_U8 i;
- + if (pTdlsPeer->is_responder == 0)
- + {
- + v_U8_t staId = (v_U8_t)pTdlsPeer->staId;
- +
- + wlan_hdd_tdls_timer_restart(pAdapter,
- + &pTdlsPeer->initiatorWaitTimeoutTimer,
- + WAIT_TIME_TDLS_INITIATOR);
- + /*
- + * Suspend initiator TX until it receives direct
- + * packet from the responder or
- + * WAIT_TIME_TDLS_INITIATOR timer expires
- + */
- + WLANTL_SuspendDataTx( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
- + &staId, NULL);
- + }
- vos_mem_zero(&smeTdlsPeerStateParams,
- sizeof(tSmeTdlsPeerStateParams));
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_early_suspend.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_early_suspend.c
- index 4625741..c15731a 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_early_suspend.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_early_suspend.c
- @@ -1325,7 +1325,6 @@ void hdd_suspend_wlan(void (*callback)(void *callbackContext, boolean suspended)
- send_suspend_ind:
- //stop all TX queues before suspend
- netif_tx_disable(pAdapter->dev);
- - WLANTL_PauseUnPauseQs(pVosContext, true);
- /* Keep this suspend indication at the end (before processing next adaptor)
- * for discrete. This indication is considered as trigger point to start
- @@ -1650,9 +1649,6 @@ void hdd_resume_wlan(void)
- send_resume_ind:
- //wake the tx queues
- - hddLog(LOG1, FL("Enabling queues"));
- - WLANTL_PauseUnPauseQs(pVosContext, false);
- -
- netif_tx_wake_all_queues(pAdapter->dev);
- hdd_conf_resume_ind(pAdapter);
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
- index 238df71..18c8adf 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_hostapd.c
- @@ -765,7 +765,10 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
- hdd_config_t *cfg = NULL;
- struct wlan_dfs_info dfs_info;
- v_U8_t cc_len = WLAN_SVC_COUNTRY_CODE_LEN;
- +
- +#ifdef WLAN_FEATURE_MBSSID
- hdd_adapter_t *con_sap_adapter;
- +#endif
- VOS_STATUS status = VOS_STATUS_SUCCESS;
- #if defined CONFIG_CNSS
- int ret = 0;
- @@ -965,13 +968,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
- || ignoreCAC)
- {
- pHddApCtx->dfs_cac_block_tx = VOS_FALSE;
- - } else {
- - /*
- - * DFS requirement: Do not transmit during CAC.
- - * This flag will be reset when BSS starts
- - * (if not in a DFS channel) or CAC ends.
- - */
- - pHddApCtx->dfs_cac_block_tx = VOS_TRUE;
- }
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED,
- @@ -1040,33 +1036,39 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
- }
- }
- #endif
- - /* reset the dfs_cac_status and dfs_cac_block_tx flag only when
- - * the last BSS is stopped
- - */
- +#ifdef WLAN_FEATURE_MBSSID
- con_sap_adapter = hdd_get_con_sap_adapter(pHostapdAdapter);
- - if (!con_sap_adapter) {
- - pHddApCtx->dfs_cac_block_tx = TRUE;
- - pHddCtx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;
- + if (con_sap_adapter) {
- + if (!VOS_IS_DFS_CH(
- + con_sap_adapter->sessionCtx.ap.operatingChannel))
- + pHddCtx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;
- }
- +#endif
- goto stopbss;
- case eSAP_DFS_CAC_START:
- wlan_hdd_send_svc_nlink_msg(WLAN_SVC_DFS_CAC_START_IND,
- &dfs_info, sizeof(struct wlan_dfs_info));
- +#ifdef WLAN_FEATURE_MBSSID
- pHddCtx->dev_dfs_cac_status = DFS_CAC_IN_PROGRESS;
- +#endif
- break;
- case eSAP_DFS_CAC_END:
- wlan_hdd_send_svc_nlink_msg(WLAN_SVC_DFS_CAC_END_IND,
- &dfs_info, sizeof(struct wlan_dfs_info));
- pHddApCtx->dfs_cac_block_tx = VOS_FALSE;
- +#ifdef WLAN_FEATURE_MBSSID
- pHddCtx->dev_dfs_cac_status = DFS_CAC_ALREADY_DONE;
- +#endif
- break;
- case eSAP_DFS_RADAR_DETECT:
- wlan_hdd_send_svc_nlink_msg(WLAN_SVC_DFS_RADAR_DETECT_IND,
- &dfs_info, sizeof(struct wlan_dfs_info));
- +#ifdef WLAN_FEATURE_MBSSID
- pHddCtx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;
- +#endif
- break;
- case eSAP_DFS_NO_AVAILABLE_CHANNEL:
- @@ -1955,13 +1957,31 @@ static iw_softap_setparam(struct net_device *dev,
- {
- hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
- tHalHandle hHal;
- - int *value = (int *)extra;
- - int sub_cmd = value[0];
- - int set_value = value[1];
- + //BEGIN MOT a19110 IKDREL3KK-11113 Fix iwpriv panic
- + int *value;
- + int sub_cmd;
- + int set_value;
- + int *tmp = (int *) extra;
- + //END IKDREL3KK-11113
- eHalStatus status;
- int ret = 0; /* success */
- v_CONTEXT_t pVosContext;
- +
- + //BEGIN MOT a19110 IKDREL3KK-11113 Fix iwpriv panic
- + if(tmp[0] < 0 || tmp[0] > QCASAP_SET_PHYMODE)
- + {
- + value = (int *)(wrqu->data.pointer);
- + }
- + else
- + {
- + value = (int *)extra;
- + }
- +
- + sub_cmd = value[0];
- + set_value = value[1];
- + //END IKDREL3KK-11113
- +
- if (!pHostapdAdapter || !pHostapdAdapter->pHddCtx)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- @@ -2982,7 +3002,7 @@ int iw_softap_modify_acl(struct net_device *dev, struct iw_request_info *info,
- #ifndef WLAN_FEATURE_MBSSID
- v_CONTEXT_t pVosContext = (WLAN_HDD_GET_CTX(pHostapdAdapter))->pvosContext;
- #endif
- - v_BYTE_t *value = (v_BYTE_t*)extra;
- + v_BYTE_t *value = (v_BYTE_t*)(wrqu->data.pointer);
- v_U8_t pPeerStaMac[VOS_MAC_ADDR_SIZE];
- int listType, cmd, i;
- int ret = 0; /* success */
- @@ -3203,7 +3223,7 @@ static iw_softap_disassoc_sta(struct net_device *dev,
- /* iwpriv tool or framework calls this ioctl with
- * data passed in extra (less than 16 octets);
- */
- - peerMacAddr = (v_U8_t *)(extra);
- + peerMacAddr = (v_U8_t *)(wrqu->data.pointer);
- hddLog(LOG1, "%s data " MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(peerMacAddr));
- @@ -4978,6 +4998,12 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
- pAdapter->sessionCtx.ap.sapContext = sapContext;
- + /*
- + * DFS requirement: Do not transmit during CAC. This flag will be reset
- + * when BSS starts(if not in a DFS channel) or CAC ends.
- + */
- + pAdapter->sessionCtx.ap.dfs_cac_block_tx = VOS_TRUE;
- +
- status = WLANSAP_Start(sapContext);
- if ( ! VOS_IS_STATUS_SUCCESS( status ) )
- {
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
- index 42e4dab..bee6957 100755
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
- @@ -651,14 +651,9 @@ end:
- static int hdd_netdev_notifier_call(struct notifier_block * nb,
- unsigned long state,
- - void *data)
- + void *ndev)
- {
- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
- - struct netdev_notifier_info *dev_notif_info = data;
- - struct net_device *dev = dev_notif_info->dev;
- -#else
- - struct net_device *dev = data;
- -#endif
- + struct net_device *dev = ndev;
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_context_t *pHddCtx;
- #ifdef WLAN_BTAMP_FEATURE
- @@ -670,15 +665,11 @@ static int hdd_netdev_notifier_call(struct notifier_block * nb,
- return NOTIFY_DONE;
- if ((pAdapter->magic != WLAN_HDD_ADAPTER_MAGIC) &&
- - (pAdapter->dev != dev)) {
- - hddLog(LOGE, FL("device adapter is not matching!!!"));
- + (pAdapter->dev != dev))
- return NOTIFY_DONE;
- - }
- - if (!dev->ieee80211_ptr) {
- - hddLog(LOGE, FL("ieee80211_ptr is NULL!!!"));
- + if (!dev->ieee80211_ptr)
- return NOTIFY_DONE;
- - }
- pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- if (NULL == pHddCtx)
- @@ -3496,13 +3487,13 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *pAdapter,
- memset(¶ms, 0, sizeof(tSirAppType2Params));
- - ret = sscanf(arg, "%17s %16s %x %x %x %u %u %hu %hu %u %u %u %u %u %u",
- + ret = sscanf(arg, "%17s %16s %x %x %x %u %u %u %u %u %u %u %u %u %u",
- mac_addr, rc4_key, (unsigned int *)¶ms.ip_id,
- (unsigned int*)¶ms.ip_device_ip,
- (unsigned int*)¶ms.ip_server_ip,
- (unsigned int*)¶ms.tcp_seq, (unsigned int*)¶ms.tcp_ack_seq,
- - (uint16_t *)¶ms.tcp_src_port,
- - (uint16_t *)¶ms.tcp_dst_port,
- + (unsigned int*)¶ms.tcp_src_port,
- + (unsigned int*)¶ms.tcp_dst_port,
- (unsigned int*)¶ms.keepalive_init,
- (unsigned int*)¶ms.keepalive_min,
- (unsigned int*)¶ms.keepalive_max,
- @@ -4015,41 +4006,6 @@ int hdd_set_miracast_mode(hdd_adapter_t *pAdapter, tANI_U8 *command)
- return 0;
- }
- -/**
- - * drv_cmd_set_fcc_channel() - handle fcc constraint request
- - * @hdd_ctx: HDD context
- - * @cmd: command ptr
- - * @cmd_len: command len
- - *
- - * Return: status
- - */
- -static int drv_cmd_set_fcc_channel(hdd_context_t *hdd_ctx, uint8_t *cmd,
- - uint8_t cmd_len)
- -{
- - uint8_t *value;
- - uint8_t fcc_constraint;
- - eHalStatus status;
- - int ret = 0;
- -
- - value = cmd + cmd_len + 1;
- -
- - ret = kstrtou8(value, 10, &fcc_constraint);
- - if ((ret < 0) || (fcc_constraint > 1)) {
- - /*
- - * If the input value is greater than max value of datatype,
- - * then also it is a failure
- - */
- - hddLog(LOGE, FL("value out of range"));
- - return -EINVAL;
- - }
- -
- - status = sme_disable_non_fcc_channel(hdd_ctx->hHal, !fcc_constraint);
- - if (status != eHAL_STATUS_SUCCESS)
- - ret = -EPERM;
- -
- - return ret;
- -}
- -
- static int hdd_driver_command(hdd_adapter_t *pAdapter,
- hdd_priv_data_t *ppriv_data)
- {
- @@ -5351,8 +5307,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
- &modProfileFields);
- sme_RoamReassoc(hHal, pAdapter->sessionId,
- NULL, modProfileFields, &roamId, 1);
- - ret = 0;
- - goto exit;
- + return 0;
- }
- /* Check channel number is a valid channel number */
- @@ -5361,9 +5316,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid Channel [%d] \n", __func__, channel);
- -
- - ret = -EINVAL;
- - goto exit;
- + return -EINVAL;
- }
- #ifdef WLAN_FEATURE_ROAM_OFFLOAD
- if (pHddCtx->cfg_ini->isRoamOffloadEnabled) {
- @@ -6131,48 +6084,23 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
- int set_value;
- /* Move pointer to point the string */
- value += 14;
- - ret = sscanf(value, "%d", &set_value);
- - if (ret != 1) {
- - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- - "Wrong value is given for hdd_set_tdls_offchannel");
- - ret = -EINVAL;
- - goto exit;
- - }
- -
- + sscanf(value, "%d", &set_value);
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- - FL("Tdls offchannel num: %d"), set_value);
- + FL("Tdls offchannel num: %d"),
- + set_value);
- ret = hdd_set_tdls_offchannel(pHddCtx, set_value);
- } else if (strncmp(command, "TDLSSCAN", 8) == 0) {
- uint8_t *value = command;
- int set_value;
- /* Move pointer to point the string */
- value += 8;
- - ret = sscanf(value, "%d", &set_value);
- - if (ret != 1) {
- - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- - "Wrong value is given for tdls_scan_type");
- - ret = -EINVAL;
- - goto exit;
- - }
- + sscanf(value, "%d", &set_value);
- hddLog(LOG1, FL("Tdls scan type val: %d"),
- set_value);
- ret = hdd_set_tdls_scan_type(pHddCtx, set_value);
- }
- #endif
- - else if (strncasecmp(command, "SET_FCC_CHANNEL", 15) == 0) {
- - /*
- - * this command wld be called by user-space when it detects WLAN
- - * ON after airplane mode is set. When APM is set, WLAN turns off.
- - * But it can be turned back on. Otherwise; when APM is turned back
- - * off, WLAN wld turn back on. So at that point the command is
- - * expected to come down. 0 means disable, 1 means enable. The
- - * constraint is removed when parameter 1 is set or different
- - * country code is set
- - */
- -
- - ret = drv_cmd_set_fcc_channel(pHddCtx, command, 15);
- -
- - } else {
- + else {
- MTRACE(vos_trace(VOS_MODULE_ID_HDD,
- TRACE_CODE_HDD_UNSUPPORTED_IOCTL,
- pAdapter->sessionId, 0));
- @@ -12053,9 +11981,15 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
- if ( VOS_STATUS_SUCCESS != hdd_update_mac_config( pHddCtx ) )
- {
- - hddLog(VOS_TRACE_LEVEL_WARN,
- - "%s: can't update mac config, using MAC from ini file",
- + hddLog(VOS_TRACE_LEVEL_FATAL,
- + "%s: can't update mac config, using MAC from serial number",
- __func__);
- + if ( VOS_STATUS_SUCCESS != hdd_update_mac_serial( pHddCtx ) )
- + {
- + hddLog(VOS_TRACE_LEVEL_FATAL,
- + "%s: can't update mac from serial number, using MAC from ini file",
- + __func__);
- + }
- }
- {
- @@ -13186,6 +13120,26 @@ tVOS_CONCURRENCY_MODE hdd_get_concurrency_mode ( void )
- return VOS_STA;
- }
- +// BEGIN MOTOROLA IKJB42MAIN-274, dpn473, 01/02/2013, Add flag to disable/enable MCC mode
- +v_U8_t hdd_get_mcc_mode( void )
- +{
- + v_CONTEXT_t pVosContext = vos_get_global_context( VOS_MODULE_ID_HDD, NULL );
- + hdd_context_t *pHddCtx;
- +
- + if (NULL != pVosContext)
- + {
- + pHddCtx = vos_get_context( VOS_MODULE_ID_HDD, pVosContext);
- + if (NULL != pHddCtx)
- + {
- + return (v_U8_t)pHddCtx->cfg_ini->enableMCC;
- + }
- + }
- + /* we are in an invalid state :( */
- + hddLog(LOGE, "%s: Invalid context", __func__);
- + return (v_U8_t)0;
- +}
- +// END IKJB42MAIN-274
- +
- /* Decide whether to allow/not the apps power collapse.
- * Allow apps power collapse if we are in connected state.
- * if not, allow only if we are in IMPS */
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_p2p.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_p2p.c
- index 874f847..0b7b1d8 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_p2p.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_p2p.c
- @@ -435,13 +435,12 @@ void wlan_hdd_cleanup_remain_on_channel_ctx(hdd_adapter_t *pAdapter)
- pAdapter->is_roc_inprogress = FALSE;
- }
- mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- +
- }
- - /* hold the lock before break from the loop */
- - mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- break;
- }
- mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- - } /* end of while */
- + }
- mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- }
- @@ -512,18 +511,6 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter,
- v_BOOL_t isGoPresent = VOS_FALSE;
- unsigned int duration;
- - mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- - if (pAdapter->is_roc_inprogress == TRUE) {
- - mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- - hddLog(VOS_TRACE_LEVEL_ERROR,
- - FL("remain on channel request is in execution"));
- - return -EBUSY;
- - }
- - cfgState->remain_on_chan_ctx = pRemainChanCtx;
- - cfgState->current_freq = pRemainChanCtx->chan.center_freq;
- - pAdapter->is_roc_inprogress = TRUE;
- - mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- -
- /* Initialize Remain on chan timer */
- vos_status = vos_timer_init(&pRemainChanCtx->hdd_remain_on_chan_timer,
- VOS_TIMER_TYPE_SW,
- @@ -532,15 +519,15 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter,
- if (vos_status != VOS_STATUS_SUCCESS)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- - FL("Not able to initialize remain_on_chan timer"));
- - mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- - cfgState->remain_on_chan_ctx = NULL;
- - pAdapter->is_roc_inprogress = FALSE;
- - mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- - vos_mem_free(pRemainChanCtx);
- - return -EINVAL;
- + "%s: Not able to initialize remain_on_chan timer",__func__);
- }
- + mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- + cfgState->remain_on_chan_ctx = pRemainChanCtx;
- + cfgState->current_freq = pRemainChanCtx->chan.center_freq;
- + pAdapter->is_roc_inprogress = TRUE;
- + mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
- +
- status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
- while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status )
- {
- @@ -702,7 +689,6 @@ static int wlan_hdd_roc_request_enqueue(hdd_adapter_t *adapter,
- void wlan_hdd_roc_request_dequeue(struct work_struct *work)
- {
- VOS_STATUS status;
- - int ret = 0;
- hdd_roc_req_t *hdd_roc_req;
- hdd_context_t *hdd_ctx =
- container_of(work, hdd_context_t, rocReqWork);
- @@ -733,14 +719,9 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work)
- spin_unlock(&hdd_ctx->hdd_roc_req_q.lock);
- if (status == VOS_STATUS_SUCCESS) {
- - ret = wlan_hdd_execute_remain_on_channel(
- + wlan_hdd_execute_remain_on_channel(
- hdd_roc_req->pAdapter,
- hdd_roc_req->pRemainChanCtx);
- - if (ret == -EBUSY){
- - hddLog(VOS_TRACE_LEVEL_ERROR,
- - FL("dropping RoC request"));
- - vos_mem_free(hdd_roc_req->pRemainChanCtx);
- - }
- vos_mem_free(hdd_roc_req);
- }
- }
- @@ -762,7 +743,6 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
- v_SIZE_t size = 0;
- hdd_adapter_t *sta_adapter;
- int ret = 0;
- - int status = 0;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__, pAdapter->device_mode);
- @@ -833,7 +813,7 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
- wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx);
- schedule_delayed_work(&pAdapter->roc_work,
- - msecs_to_jiffies(pHddCtx->cfg_ini->p2p_listen_defer_interval));
- + msecs_to_jiffies(pHddCtx->cfg_ini->p2p_listen_defer_interval));
- hddLog(LOG1, "Defer interval is %hu, pAdapter %p",
- pHddCtx->cfg_ini->p2p_listen_defer_interval, pAdapter);
- return 0;
- @@ -846,20 +826,12 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
- if ((isBusy == VOS_FALSE) && (!size)) {
- /* Media is free and no RoC request is in queue, execute directly */
- - status = wlan_hdd_execute_remain_on_channel(pAdapter,
- - pRemainChanCtx);
- - if (status == -EBUSY) {
- - if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx)) {
- - vos_mem_free(pRemainChanCtx);
- - return -EAGAIN;
- - }
- - }
- + wlan_hdd_execute_remain_on_channel(pAdapter, pRemainChanCtx);
- +
- return 0;
- } else {
- - if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx)) {
- - vos_mem_free(pRemainChanCtx);
- - return -EAGAIN;
- - }
- + if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx))
- + return -EAGAIN;
- }
- /*
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tdls.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tdls.c
- index c4a7e00..d141acb 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tdls.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tdls.c
- @@ -51,6 +51,7 @@ static tANI_S32 wlan_hdd_get_tdls_discovery_peer_cnt(tdlsCtx_t *pHddTdlsCtx);
- static tANI_S32 wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *pHddTdlsCtx);
- static void wlan_hdd_tdls_timers_destroy(tdlsCtx_t *pHddTdlsCtx);
- +static void wlan_hdd_tdls_peer_timers_destroy(tdlsCtx_t *pHddTdlsCtx);
- int wpa_tdls_is_allowed_force_peer(tdlsCtx_t *pHddTdlsCtx, u8 *mac);
- #ifdef CONFIG_TDLS_IMPLICIT
- static void wlan_hdd_tdls_pre_setup(struct work_struct *work);
- @@ -423,6 +424,31 @@ static v_VOID_t wlan_hdd_tdls_discovery_timeout_peer_cb(v_PVOID_t userData)
- return;
- }
- +static v_VOID_t wlan_hdd_tdls_initiator_wait_cb( v_PVOID_t userData )
- +{
- + hddTdlsPeer_t *curr_peer = (hddTdlsPeer_t *)userData;
- + tdlsCtx_t *pHddTdlsCtx;
- +
- + if ( NULL == curr_peer )
- + {
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + FL("curr_peer is NULL"));
- + return;
- + }
- +
- + pHddTdlsCtx = curr_peer->pHddTdlsCtx;
- +
- + if ( NULL == pHddTdlsCtx )
- + {
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + FL("pHddTdlsCtx is NULL"));
- + return;
- + }
- +
- + WLANTL_ResumeDataTx( (WLAN_HDD_GET_CTX(pHddTdlsCtx->pAdapter))->pvosContext,
- + (v_U8_t *)&curr_peer->staId);
- +}
- +
- static void wlan_hdd_tdls_free_list(tdlsCtx_t *pHddTdlsCtx)
- {
- int i;
- @@ -481,10 +507,28 @@ static void wlan_hdd_tdls_monitor_timers_stop(tdlsCtx_t *pHddTdlsCtx)
- vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
- }
- +/* stop all per peer timers */
- +static void wlan_hdd_tdls_peer_timers_stop(tdlsCtx_t *pHddTdlsCtx)
- +{
- + int i;
- + struct list_head *head;
- + struct list_head *pos;
- + hddTdlsPeer_t *curr_peer;
- + for (i = 0; i < TDLS_PEER_LIST_SIZE; i++)
- + {
- + head = &pHddTdlsCtx->peer_list[i];
- + list_for_each (pos, head) {
- + curr_peer = list_entry (pos, hddTdlsPeer_t, node);
- + vos_timer_stop( &curr_peer->initiatorWaitTimeoutTimer );
- + }
- + }
- +}
- +
- /* stop all the tdls timers running */
- static void wlan_hdd_tdls_timers_stop(tdlsCtx_t *pHddTdlsCtx)
- {
- wlan_hdd_tdls_monitor_timers_stop(pHddTdlsCtx);
- + wlan_hdd_tdls_peer_timers_stop(pHddTdlsCtx);
- }
- int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
- @@ -579,6 +623,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
- list_for_each_safe(pos, q, head) {
- tmp = list_entry(pos, hddTdlsPeer_t, node);
- if (FALSE == tmp->isForcedPeer) {
- + vos_timer_destroy(&tmp->initiatorWaitTimeoutTimer);
- list_del(pos);
- vos_mem_free(tmp);
- tmp = NULL;
- @@ -891,11 +936,32 @@ static void wlan_hdd_tdls_monitor_timers_destroy(tdlsCtx_t *pHddTdlsCtx)
- vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
- vos_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
- }
- +/*Free all the timers related to the TDLS peer */
- +static void wlan_hdd_tdls_peer_timers_destroy(tdlsCtx_t *pHddTdlsCtx)
- +{
- + int i;
- + struct list_head *head;
- + struct list_head *pos;
- + hddTdlsPeer_t *curr_peer;
- + for (i = 0; i < TDLS_PEER_LIST_SIZE; i++)
- + {
- + head = &pHddTdlsCtx->peer_list[i];
- +
- + list_for_each (pos, head) {
- + curr_peer = list_entry (pos, hddTdlsPeer_t, node);
- +
- + vos_timer_stop(&curr_peer->initiatorWaitTimeoutTimer);
- + vos_timer_destroy(&curr_peer->initiatorWaitTimeoutTimer);
- + }
- + }
- +
- +}
- /* destroy all the tdls timers running */
- static void wlan_hdd_tdls_timers_destroy(tdlsCtx_t *pHddTdlsCtx)
- {
- wlan_hdd_tdls_monitor_timers_destroy(pHddTdlsCtx);
- + wlan_hdd_tdls_peer_timers_destroy(pHddTdlsCtx);
- }
- /* if mac address exist, return pointer
- @@ -952,6 +1018,11 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac)
- peer->pHddTdlsCtx = pHddTdlsCtx;
- peer->pref_off_chan_num = pHddCtx->cfg_ini->fTDLSPrefOffChanNum;
- + vos_timer_init(&peer->initiatorWaitTimeoutTimer,
- + VOS_TIMER_TYPE_SW,
- + wlan_hdd_tdls_initiator_wait_cb,
- + peer);
- +
- list_add_tail(&peer->node, head);
- mutex_unlock(&pHddCtx->tdls_lock);
- @@ -2074,6 +2145,7 @@ void wlan_hdd_tdls_disconnection_callback(hdd_adapter_t *pAdapter)
- wlan_hdd_tdls_check_power_save_prohibited(pHddTdlsCtx->pAdapter);
- wlan_hdd_tdls_monitor_timers_stop(pHddTdlsCtx);
- + wlan_hdd_tdls_peer_timers_destroy(pHddTdlsCtx);
- wlan_hdd_tdls_free_list(pHddTdlsCtx);
- pHddTdlsCtx->curr_candidate = NULL;
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tx_rx.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tx_rx.c
- index ec4940f..591153c 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tx_rx.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_tx_rx.c
- @@ -85,6 +85,7 @@ const v_U8_t hdd_QdiscAcToTlAC[] = {
- };
- static struct sk_buff* hdd_mon_tx_fetch_pkt(hdd_adapter_t* pAdapter);
- +extern int dumpEnable;
- /*---------------------------------------------------------------------------
- Type declarations
- @@ -1749,75 +1750,81 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
- skb = (struct sk_buff *) rxBuf;
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- while (NULL != skb) {
- - skb_next = skb->next;
- -
- - if ((pHddStaCtx->conn_info.proxyARPService) &&
- - cfg80211_is_gratuitous_arp_unsolicited_na(skb)) {
- - ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- - VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- - "%s: Dropping HS 2.0 Gratuitous ARP or Unsolicited NA", __func__);
- - kfree_skb(skb);
- -
- - skb = skb_next;
- - continue;
- - }
- + skb_next = skb->next;
- +
- + if ((pHddStaCtx->conn_info.proxyARPService) &&
- + cfg80211_is_gratuitous_arp_unsolicited_na(skb)) {
- + ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- + VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- + "%s: Dropping HS 2.0 Gratuitous ARP or Unsolicited NA", __func__);
- + kfree_skb(skb);
- + skb = skb_next;
- + continue;
- + }
- #ifdef QCA_PKT_PROTO_TRACE
- if ((pHddCtx->cfg_ini->gEnableDebugLog & VOS_PKT_TRAC_TYPE_EAPOL) ||
- (pHddCtx->cfg_ini->gEnableDebugLog & VOS_PKT_TRAC_TYPE_DHCP)) {
- proto_type = vos_pkt_get_proto_type(skb,
- pHddCtx->cfg_ini->gEnableDebugLog, 0);
- - if (VOS_PKT_TRAC_TYPE_EAPOL & proto_type)
- - vos_pkt_trace_buf_update("ST:R:EPL");
- - else if (VOS_PKT_TRAC_TYPE_DHCP & proto_type)
- - vos_pkt_trace_buf_update("ST:R:DHC");
- - }
- + if (VOS_PKT_TRAC_TYPE_EAPOL & proto_type)
- + vos_pkt_trace_buf_update("ST:R:EPL");
- + else if (VOS_PKT_TRAC_TYPE_DHCP & proto_type)
- + vos_pkt_trace_buf_update("ST:R:DHC");
- + }
- +
- #endif /* QCA_PKT_PROTO_TRACE */
- skb->dev = pAdapter->dev;
- skb->protocol = eth_type_trans(skb, skb->dev);
- - /* Check & drop mcast packets (for IPV6) as required */
- - if (drop_ip6_mcast(skb)) {
- + /* Check & drop mcast packets (for IPV6) as required */
- + if (drop_ip6_mcast(skb)) {
- print_hex_dump_bytes("MAC Header",
- - DUMP_PREFIX_NONE, skb_mac_header(skb), 16);
- + DUMP_PREFIX_NONE, skb_mac_header(skb), 16);
- ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- - "%s: Dropping multicast to self NA", __func__);
- - kfree_skb(skb);
- -
- - skb = skb_next;
- - continue;
- - }
- -
- - ++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
- - ++pAdapter->stats.rx_packets;
- - pAdapter->stats.rx_bytes += skb->len;
- -
- - /*
- - * If this is not a last packet on the chain
- - * Just put packet into backlog queue, not scheduling RX sirq
- - */
- - if (skb->next) {
- - rxstat = netif_rx(skb);
- - } else {
- + "%s: Dropping multicast to self NA", __func__);
- + kfree_skb(skb);
- +
- + skb = skb_next;
- + continue;
- + }
- +
- + ++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
- + ++pAdapter->stats.rx_packets;
- + pAdapter->stats.rx_bytes += skb->len;
- +
- + /*
- + * If this is not a last packet on the chain
- + * Just put packet into backlog queue, not scheduling RX sirq
- + */
- + if (skb->next) {
- + rxstat = netif_rx(skb);
- + } else {
- #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
- - vos_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- - HDD_WAKE_LOCK_DURATION);
- + vos_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- + HDD_WAKE_LOCK_DURATION);
- #endif
- - /*
- - * This is the last packet on the chain
- - * Scheduling rx sirq
- - */
- - rxstat = netif_rx_ni(skb);
- - }
- -
- - if (NET_RX_SUCCESS == rxstat)
- - ++pAdapter->hdd_stats.hddTxRxStats.rxDelivered;
- - else
- - ++pAdapter->hdd_stats.hddTxRxStats.rxRefused;
- -
- - skb = skb_next;
- + if (dumpEnable == 1) {
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + "%s: RX-data dump\n", __func__);
- + VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + skb->data, 64);
- + }
- + /*
- + * This is the last packet on the chain
- + * Scheduling rx sirq
- + */
- + rxstat = netif_rx_ni(skb);
- + }
- +
- + if (NET_RX_SUCCESS == rxstat)
- + ++pAdapter->hdd_stats.hddTxRxStats.rxDelivered;
- + else
- + ++pAdapter->hdd_stats.hddTxRxStats.rxRefused;
- +
- + skb = skb_next;
- }
- pAdapter->dev->last_rx = jiffies;
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
- index e52008e..3aecb37 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
- @@ -118,7 +118,7 @@
- #define HDD_FINISH_ULA_TIME_OUT 800
- #define HDD_SET_MCBC_FILTERS_TO_FW 1
- #define HDD_DELETE_MCBC_FILTERS_FROM_FW 0
- -
- +extern int dumpEnable;
- extern int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand);
- static int ioctl_debug;
- module_param(ioctl_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
- @@ -241,6 +241,10 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
- /* Private ioctl for packet power save */
- #define WE_PPS_5G_EBT 83
- #define WE_SET_CTS_CBW 84
- +#define WE_SET_CHANNEL_RANGE 85 // Motorola, IKDREL3KK-5698
- +// The below one should always be the last entry
- +// It will have a value of last sub_cmd + 1
- +#define MAX_SUB_CMD 86 // Motorola, IKDREL3KK-10418
- /* Private ioctls and their sub-ioctls */
- #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
- @@ -252,6 +256,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
- /* 7 is unused */
- #define WE_GET_SAP_AUTO_CHANNEL_SELECTION 8
- #define WE_GET_CONCURRENCY_MODE 9
- +#define WE_GET_MCC_MODE 10 /* MOTOROLA IKJB42MAIN-274 */
- #define WE_GET_NSS 11
- #define WE_GET_LDPC 12
- #define WE_GET_TX_STBC 13
- @@ -4603,9 +4608,17 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
- hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- tSmeConfigParams smeConfig;
- + //BEGIN MOT a19110 IKDREL3KK-10418
- + int *value;
- + int sub_cmd, set_value, cmd_len;
- + int *tmp_value;
- + //END IKDREL3KK-10418
- + //BEGIN MOT a19110 IKDREL3KK-5698
- +#if 0
- int *value = (int *)extra;
- int sub_cmd = value[0];
- int set_value = value[1];
- +#endif
- int ret = 0; /* success */
- int enable_pbm, enable_mp;
- @@ -4622,6 +4635,34 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
- return -EBUSY;
- }
- + //BEGIN MOT a19110 IKDREL3KK-10418
- + tmp_value = (int *)extra;
- +
- + // Copy from wrqu structure if it was a ioctl from Motorola code
- + if(tmp_value[0] < 0 || (tmp_value[0] >= MAX_SUB_CMD)) {
- + cmd_len = wrqu->data.length;
- + value = (int *) kmalloc(cmd_len+1, GFP_KERNEL); // Motorola, IKHSS7-39028
- +
- + if(value == NULL)
- + return -ENOMEM;
- +
- + if(copy_from_user((char *) value, (char*)(wrqu->data.pointer), cmd_len)) {
- + hddLog(VOS_TRACE_LEVEL_FATAL, "%s -- copy_from_user --data pointer failed! bailing",
- + __FUNCTION__);
- + kfree(value);
- + return -EFAULT;
- + }
- +
- + sub_cmd = value[0];
- + set_value = value[1];
- + kfree(value);
- + } else {
- + value = (int *)extra;
- + sub_cmd = value[0];
- + set_value = value[1];
- + }
- + //END IKDREL3KK-10418
- +
- switch(sub_cmd)
- {
- case WE_SET_11D_STATE:
- @@ -5546,6 +5587,14 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
- case WE_SET_TXRX_FWSTATS:
- {
- hddLog(LOG1, "WE_SET_TXRX_FWSTATS val %d", set_value);
- +#if 0
- + if (set_value == 9)
- + dumpEnable =1;
- + else if (set_value == 10)
- + dumpEnable = 0;
- + else
- +#endif
- + dumpEnable = 0;
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID,
- set_value, VDEV_CMD);
- @@ -5978,6 +6027,31 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
- set_value, VDEV_CMD);
- break;
- }
- + //BEGIN MOT a19110 IKDREL3KK-5698
- + case WE_SET_CHANNEL_RANGE:
- + {
- + int startChannel, endChannel;
- +
- + if (set_value == 3) {
- + startChannel = 149;
- + endChannel = 161;
- + } else if (set_value == 2) {
- + startChannel = 100;
- + endChannel = 144;
- + } else if (set_value == 1) {
- + startChannel = 36;
- + endChannel = 64;
- + } else {
- + set_value = 0;
- + startChannel = 1;
- + endChannel = 14;
- + }
- +
- + ret = iw_softap_set_channel_range( dev, startChannel, endChannel, set_value);
- +
- + break;
- + }
- + // END IKDREL3KK-5698
- default:
- {
- hddLog(LOGE, "%s: Invalid sub command %d", __func__, sub_cmd);
- @@ -6179,6 +6253,13 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, ("concurrency mode=%d"),*value);
- break;
- }
- + // BEGIN MOTOROLA IKJB42MAIN-274, dpn473, 01/02/2013, Add flag to disable/enable MCC mode
- + case WE_GET_MCC_MODE:
- + {
- + *value = (int)hdd_get_mcc_mode();
- + break;
- + }
- + // IKJB42MAIN-274
- case WE_GET_NSS:
- {
- @@ -6652,8 +6733,12 @@ int iw_set_three_ints_getnone(struct net_device *dev,
- union iwreq_data *wrqu, char *extra)
- {
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- - int *value = (int *)extra;
- - int sub_cmd = value[0];
- + //BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
- + int *value;
- + int sub_cmd, cmd_len;
- + int *tmp_value;
- + int *get_value = NULL;
- + //END IKSWL-15774
- int ret = 0;
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress) {
- @@ -6662,6 +6747,31 @@ int iw_set_three_ints_getnone(struct net_device *dev,
- return -EBUSY;
- }
- + //BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
- + tmp_value = (int *)extra;
- +
- + // Copy from wrqu structure if it was a ioctl from Motorola code
- + if(tmp_value[0] < 0 || (tmp_value[0] >= MAX_SUB_CMD)) {
- + cmd_len = wrqu->data.length;
- + get_value = (int *) kmalloc(cmd_len+1, GFP_KERNEL); // Motorola, IKHSS7-39028
- +
- + if(get_value == NULL)
- + return -ENOMEM;
- +
- + if(copy_from_user((char *) get_value, (char*)(wrqu->data.pointer), cmd_len)) {
- + hddLog(VOS_TRACE_LEVEL_FATAL, "%s -- copy_from_user --data pointer failed! bailing",
- + __FUNCTION__);
- + kfree(get_value);
- + return -EFAULT;
- + }
- +
- + value = (int *)get_value;
- + } else {
- + value = (int *)extra;
- + }
- + sub_cmd = value[0];
- + //END IKSWL-15774
- +
- switch(sub_cmd) {
- case WE_SET_WLAN_DBG:
- @@ -6677,6 +6787,12 @@ int iw_set_three_ints_getnone(struct net_device *dev,
- break;
- }
- +
- + //BEGIN MOT a19110 IKSWL-15774 Ioctl from Mot code
- + if(get_value != NULL)
- + kfree(get_value);
- + //END IKSWL-15774
- +
- return ret;
- }
- @@ -10097,6 +10213,13 @@ static const struct iw_priv_args we_private_args[] = {
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0, "erx_dri_sample" },
- + //BEGIN MOT a19110 IKDREL3KK-5698
- + { WE_SET_CHANNEL_RANGE,
- + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- + 0,
- + "setChannelRange" },
- + //END IKDREL3KK-5698
- +
- { WLAN_PRIV_SET_NONE_GET_INT,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- @@ -10133,6 +10256,12 @@ static const struct iw_priv_args we_private_args[] = {
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "getconcurrency" },
- + /* MOTOROLA IKJB42MAIN-274 */
- + { WE_GET_MCC_MODE,
- + 0,
- + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- + "getMccMode" },
- +
- { WE_GET_NSS,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wmm.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wmm.c
- index 1c6ea71..a43b3a3 100644
- --- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wmm.c
- +++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wmm.c
- @@ -1576,10 +1576,7 @@ VOS_STATUS hdd_wmm_adapter_close ( hdd_adapter_t* pAdapter )
- #ifdef FEATURE_WLAN_ESE
- hdd_wmm_disable_inactivity_timer(pQosContext);
- #endif
- - if (pQosContext->handle == HDD_WMM_HANDLE_IMPLICIT
- - && pQosContext->magic == HDD_WMM_CTX_MAGIC)
- - vos_flush_work(&pQosContext->wmmAcSetupImplicitQos);
- -
- + vos_flush_work(&pQosContext->wmmAcSetupImplicitQos);
- hdd_wmm_free_context(pQosContext);
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/inc/qwlan_version.h b/drivers/staging/qcacld-2.0/CORE/MAC/inc/qwlan_version.h
- index b84b50f..3be167d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/inc/qwlan_version.h
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/inc/qwlan_version.h
- @@ -42,10 +42,9 @@ BRIEF DESCRIPTION:
- #define QWLAN_VERSION_MINOR 4
- #define QWLAN_VERSION_PATCH 21
- #define QWLAN_VERSION_EXTRA ""
- -#define QWLAN_VERSION_BUILD 65
- -
- -#define QWLAN_VERSIONSTR "4.4.21.65"
- +#define QWLAN_VERSION_BUILD 52
- +#define QWLAN_VERSIONSTR "4.4.21.52"
- #define AR6320_REV1_VERSION 0x5000000
- #define AR6320_REV1_1_VERSION 0x5000001
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/inc/sirApi.h b/drivers/staging/qcacld-2.0/CORE/MAC/inc/sirApi.h
- index 260e120..8eee749 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/inc/sirApi.h
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/inc/sirApi.h
- @@ -3496,7 +3496,6 @@ typedef struct sSirSmeAddStaSelfReq
- tANI_U32 type;
- tANI_U32 subType;
- tANI_U8 sessionId;
- - tANI_U16 pkt_err_disconn_th;
- }tSirSmeAddStaSelfReq, *tpSirSmeAddStaSelfReq;
- typedef struct sSirSmeDelStaSelfReq
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/include/limSession.h b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/include/limSession.h
- index d05acb6..678c4b2 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/include/limSession.h
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/include/limSession.h
- @@ -616,18 +616,6 @@ tpPESession peFindSessionByPeerSta(tpAniSirGlobal pMac, tANI_U8* sa, tANI_U8* s
- --------------------------------------------------------------------------*/
- void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry);
- -/**
- - * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
- - * session id
- - * @mac_ctx: pointer to global adapter context
- - * @sme_session_id: sme session id
- - *
- - * looks up the PE session for given sme session id
- - *
- - * Return: pe session entry for given sme session if found else NULL
- - */
- -tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
- - uint8_t sme_session_id);
- /*--------------------------------------------------------------------------
- \brief peDeleteSession() - Returns the SME session ID and Transaction ID .
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
- index 50f68dc..f856e50 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
- @@ -100,16 +100,16 @@ limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
- tpDeleteStaContext pMsg = (tpDeleteStaContext)limMsg->bodyptr;
- tpDphHashNode pStaDs;
- tpPESession psessionEntry ;
- + tANI_U8 sessionId;
- if(NULL == pMsg)
- {
- PELOGE(limLog(pMac, LOGE,FL("Invalid body pointer in message"));)
- return;
- }
- - psessionEntry = pe_find_session_by_sme_session_id(pMac, pMsg->vdev_id);
- - if(NULL == psessionEntry)
- + if((psessionEntry = peFindSessionByBssid(pMac,pMsg->bssId,&sessionId))== NULL)
- {
- - limLog(pMac, LOGE, FL("session not found for given sme session"));
- + PELOGE(limLog(pMac, LOGE,FL("session does not exist for given BSSId"));)
- vos_mem_free(pMsg);
- return;
- }
- @@ -117,23 +117,7 @@ limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
- switch(pMsg->reasonCode)
- {
- case HAL_DEL_STA_REASON_CODE_KEEP_ALIVE:
- - if (LIM_IS_STA_ROLE(psessionEntry) && !pMsg->is_tdls) {
- - pStaDs = dphGetHashEntry(pMac,
- - DPH_STA_HASH_INDEX_PEER,
- - &psessionEntry->dph.dphHashTable);
- - if (NULL == pStaDs) {
- - limLog(pMac, LOGE, FL("Dph entry not found."));
- - vos_mem_free(pMsg);
- - return;
- - }
- - limSendDeauthMgmtFrame(pMac,
- - eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
- - pMsg->addr2, psessionEntry, FALSE);
- - limTearDownLinkWithAp(pMac, psessionEntry->peSessionId,
- - eSIR_MAC_UNSPEC_FAILURE_REASON);
- - /* only break for STA role (non TDLS) */
- - break;
- - }
- + case HAL_DEL_STA_REASON_CODE_TIM_BASED:
- PELOGE(limLog(pMac, LOGE, FL(" Deleting station: staId = %d, reasonCode = %d"), pMsg->staId, pMsg->reasonCode);)
- if (eLIM_STA_IN_IBSS_ROLE == psessionEntry->limSystemRole)
- return;
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
- index fa00aed..2595489 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
- @@ -5157,7 +5157,6 @@ __limProcessSmeAddStaSelfReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
- pAddStaSelfParams->sessionId = pSmeReq->sessionId;
- pAddStaSelfParams->type = pSmeReq->type;
- pAddStaSelfParams->subType = pSmeReq->subType;
- - pAddStaSelfParams->pkt_err_disconn_th = pSmeReq->pkt_err_disconn_th;
- msg.type = SIR_HAL_ADD_STA_SELF_REQ;
- msg.reserved = 0;
- @@ -6503,8 +6502,7 @@ limProcessSmeDfsCsaIeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg)
- /* Channel switch announcement needs to be included in beacon */
- psessionEntry->dfsIncludeChanSwIe = VOS_TRUE;
- psessionEntry->gLimChannelSwitch.switchCount = LIM_MAX_CSA_IE_UPDATES;
- - if (pMac->sap.SapDfsInfo.disable_dfs_ch_switch == VOS_FALSE)
- - psessionEntry->gLimChannelSwitch.switchMode = 1;
- + psessionEntry->gLimChannelSwitch.switchMode = 1;
- /* Validate if SAP is operating HT or VHT
- * mode and set the Channel Switch Wrapper
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
- index 6a0db83..4c2ac6d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
- @@ -507,21 +507,6 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
- psessionEntry->assocRsp = NULL;
- }
- -#ifdef WLAN_FEATURE_VOWIFI_11R
- - if(psessionEntry->ricData != NULL)
- - {
- - vos_mem_free( psessionEntry->ricData);
- - psessionEntry->ricData = NULL;
- - }
- -#endif
- -
- -#ifdef FEATURE_WLAN_ESE
- - if(psessionEntry->tspecIes != NULL)
- - {
- - vos_mem_free(psessionEntry->tspecIes);
- - psessionEntry->tspecIes = NULL;
- - }
- -#endif
- }
- }
- @@ -1378,8 +1363,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
- switch (disassocTrigger)
- {
- case eLIM_PEER_ENTITY_DISASSOC:
- - if (reasonCode != eSIR_SME_STA_NOT_ASSOCIATED)
- - return;
- + return;
- case eLIM_HOST_DISASSOC:
- /**
- @@ -3251,8 +3235,7 @@ limProcessBeaconTxSuccessInd(tpAniSirGlobal pMac, tANI_U16 msgType, void *event)
- {
- /* Done with CSA IE update, send response back to SME */
- psessionEntry->gLimChannelSwitch.switchCount = 0;
- - if (pMac->sap.SapDfsInfo.disable_dfs_ch_switch == VOS_FALSE)
- - psessionEntry->gLimChannelSwitch.switchMode = 0;
- + psessionEntry->gLimChannelSwitch.switchMode = 0;
- psessionEntry->dfsIncludeChanSwIe = VOS_FALSE;
- psessionEntry->dfsIncludeChanWrapperIe = VOS_FALSE;
- diff --git a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSession.c b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSession.c
- index b6bc3424..211852d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSession.c
- +++ b/drivers/staging/qcacld-2.0/CORE/MAC/src/pe/lim/limSession.c
- @@ -153,6 +153,17 @@ void pe_reset_protection_callback(void *ptr)
- &beacon_params, pe_session_entry);
- }
- + /* index 0, is self node, peers start from 1 */
- + for(i = 1 ; i < mac_ctx->lim.gLimAssocStaLimit ; i++)
- + {
- + station_hash_node = dphGetHashEntry(mac_ctx, i,
- + &pe_session_entry->dph.dphHashTable);
- + if (NULL == station_hash_node)
- + continue;
- + limDecideApProtection(mac_ctx, station_hash_node->staAddr,
- + &beacon_params, pe_session_entry);
- + }
- +
- if ((current_protection_state != pe_session_entry->old_protection_state) &&
- (VOS_FALSE == mac_ctx->sap.SapDfsInfo.is_dfs_cac_timer_running)) {
- VOS_TRACE(VOS_MODULE_ID_PE,
- @@ -447,33 +458,6 @@ tpPESession peFindSessionByBssIdx(tpAniSirGlobal pMac, tANI_U8 bssIdx)
- return NULL;
- }
- -/**
- - * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
- - * session id
- - * @mac_ctx: pointer to global adapter context
- - * @sme_session_id: sme session id
- - *
- - * looks up the PE session for given sme session id
- - *
- - * Return: pe session entry for given sme session if found else NULL
- - */
- -tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
- - tANI_U8 sme_session_id)
- -{
- - uint8_t i;
- - for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
- - if ( (mac_ctx->lim.gpSession[i].valid) &&
- - (mac_ctx->lim.gpSession[i].smeSessionId ==
- - sme_session_id) ) {
- - return &mac_ctx->lim.gpSession[i];
- - }
- - }
- - limLog(mac_ctx, LOG4,
- - FL("Session lookup fails for smeSessionID: %d"),
- - sme_session_id);
- - return NULL;
- -}
- -
- /*--------------------------------------------------------------------------
- \brief peFindSessionBySessionId() - looks up the PE session given the session ID.
- diff --git a/drivers/staging/qcacld-2.0/CORE/SAP/inc/sapApi.h b/drivers/staging/qcacld-2.0/CORE/SAP/inc/sapApi.h
- index d3589dc..74a1d23 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SAP/inc/sapApi.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SAP/inc/sapApi.h
- @@ -621,12 +621,6 @@ typedef struct sSapDfsInfo
- * operating DFS channel.
- */
- v_U8_t sap_operating_chan_preferred_location;
- -
- - /*
- - * Flag to indicate if DFS test mode is enabled and
- - * channel switch is disabled.
- - */
- - v_U8_t disable_dfs_ch_switch;
- } tSapDfsInfo;
- typedef struct tagSapCtxList
- diff --git a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapApiLinkCntl.c b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapApiLinkCntl.c
- index d944cf8..23e76c0 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapApiLinkCntl.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapApiLinkCntl.c
- @@ -305,7 +305,6 @@ WLANSAP_RoamCallback
- eHalStatus halStatus = eHAL_STATUS_SUCCESS;
- tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
- tpAniSirGlobal pMac = NULL;
- - tANI_U8 dfs_beacon_start_req = 0;
- if (NULL == hHal)
- {
- @@ -717,13 +716,14 @@ WLANSAP_RoamCallback
- break;
- case eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND:
- - if (eSAP_DFS_CAC_WAIT == sapContext->sapsMachine)
- + if (sapContext->csrRoamProfile.disableDFSChSwitch)
- {
- - if (sapContext->csrRoamProfile.disableDFSChSwitch) {
- - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "sapdfs: DFS channel switch disabled");
- - break;
- - }
- + break;
- + }
- + if (eSAP_DFS_CAC_WAIT == sapContext->sapsMachine)
- + {
- if (VOS_TRUE == pMac->sap.SapDfsInfo.sap_radar_found_status)
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_MED,
- @@ -782,22 +782,6 @@ WLANSAP_RoamCallback
- eCsrPhyMode phyMode =
- sapConvertSapPhyModeToCsrPhyMode(sapContext->csrRoamProfile.phyMode);
- - if (sapContext->csrRoamProfile.disableDFSChSwitch) {
- - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- - "sapdfs: DFS channel switch disabled");
- - /*
- - * Send a beacon start request to PE. CSA IE required
- - * flag from beacon template will be cleared by now.
- - * A new beacon template with no CSA IE will be sent
- - * to firmware.
- - */
- - dfs_beacon_start_req = VOS_TRUE;
- - halStatus = sme_RoamStartBeaconReq( hHal,
- - sapContext->bssid,
- - dfs_beacon_start_req);
- - break;
- - }
- -
- /* Both success and failure cases are handled intentionally handled
- * together. Irrespective of whether the channel switch IE was
- * sent out successfully or not, SAP should still vacate the
- diff --git a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapChSelect.h b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapChSelect.h
- index 9f037ee..7921279 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapChSelect.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapChSelect.h
- @@ -113,7 +113,7 @@ typedef enum
- CHANNEL_14
- } tSapChannel;
- -#define MAX_80MHZ_BANDS 6
- +#define MAX_80MHZ_BANDS 5
- #define SAP_80MHZ_MASK 0x0F
- #define SAP_40MHZ_MASK_L 0x03
- #define SAP_40MHZ_MASK_H 0x0C
- @@ -191,11 +191,7 @@ typedef struct sSapTxLeakInfo {
- typedef struct sSapChanMatrixInfo {
- v_U8_t channel; /* channel to switch from */
- -#ifdef FEATURE_WLAN_CH144
- - tSapTxLeakInfo chan_matrix[RF_CHAN_144 - RF_CHAN_36 + 1];
- -#else
- tSapTxLeakInfo chan_matrix[RF_CHAN_140 - RF_CHAN_36 + 1];
- -#endif
- } tSapChanMatrixInfo;
- #endif // if !defined __SAP_CH_SELECT_H
- diff --git a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapFsm.c b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapFsm.c
- index 4cbdf80..d4f4dab 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapFsm.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapFsm.c
- @@ -89,17 +89,6 @@ extern sapSafeChannelType safeChannels[];
- * Static Variable Definitions
- * -------------------------------------------------------------------------*/
- -#ifdef WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- -/*
- - * TODO: At present SAP Channel leakage matrix for ch 144
- - * is not available from system's team. So to play it safe
- - * and avoid crash if channel 144 is request, in following
- - * matix channel 144 is added such that it will cause code
- - * to avoid selecting channel 144.
- - *
- - * THESE ENTRIES SHOULD BE REPLACED WITH CORRECT VALUES AS
- - * PROVIDED BY SYSTEM'S TEAM.
- - */
- /* channel tx leakage table - ht80 */
- tSapChanMatrixInfo ht80_chan[] =
- {
- @@ -113,12 +102,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 424}, {120, 429},
- {124, 437}, {128, 435},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {56,
- {{36, 171}, {40, 178},
- @@ -130,11 +114,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 403}, {120, 397},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {60,
- {{36, 156}, {40, 146},
- @@ -146,11 +126,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 395}, {120, 399},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {64,
- {{36, 217}, {40, 221},
- @@ -162,11 +138,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 375}, {120, 374},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {100,
- {{36, 357}, {40, 326},
- @@ -178,11 +150,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 166}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {104,
- {{36, 325}, {40, 325},
- @@ -194,11 +162,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 198}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {108,
- {{36, 304}, {40, 332},
- @@ -210,11 +174,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 185}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {112,
- {{36, 327}, {40, 335},
- @@ -226,11 +186,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 189}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {116,
- {{36, 384}, {40, 372},
- @@ -242,11 +198,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {120,
- {{36, 395}, {40, 419},
- @@ -258,11 +210,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, 159},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {124,
- {{36, 469}, {40, 433},
- @@ -274,11 +222,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 350}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, 138},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {128,
- {{36, 408}, {40, 434},
- @@ -290,12 +234,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, 142}, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {132,
- {{36, SAP_TX_LEAKAGE_MAX }, {40, SAP_TX_LEAKAGE_MAX },
- {44, SAP_TX_LEAKAGE_MAX }, {48, SAP_TX_LEAKAGE_MAX },
- @@ -306,12 +245,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, SAP_TX_LEAKAGE_MIN },{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN }
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN }}},
- {136,
- {{36, SAP_TX_LEAKAGE_MAX }, {40, SAP_TX_LEAKAGE_MAX },
- {44, SAP_TX_LEAKAGE_MAX }, {48, SAP_TX_LEAKAGE_MAX },
- @@ -322,12 +256,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {116, SAP_TX_LEAKAGE_MIN }, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN }
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN }}},
- {140,
- {{36, SAP_TX_LEAKAGE_MAX }, {40, SAP_TX_LEAKAGE_MAX },
- {44, SAP_TX_LEAKAGE_MAX }, {48, SAP_TX_LEAKAGE_MAX },
- @@ -337,11 +266,7 @@ tSapChanMatrixInfo ht80_chan[] =
- {108, SAP_TX_LEAKAGE_MIN },{112, SAP_TX_LEAKAGE_MIN },
- {116, SAP_TX_LEAKAGE_MIN }, {120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- - {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN}}},
- };
- /* channel tx leakage table - ht40 */
- @@ -357,12 +282,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {56,
- {{36, 446}, {40, 446 },
- {44, 300}, {48, 300 },
- @@ -373,12 +293,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {60,
- {{36, 481}, {40, 481 },
- {44, 407}, {48, 407 },
- @@ -389,12 +304,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {64,
- {{36, 524}, {40, 524 },
- {44, 527}, {48, 527 },
- @@ -405,11 +315,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {100,
- {{36, 618}, {40, 618 },
- @@ -421,12 +327,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 486}, {120, 486 },
- {124, 498}, {128, 498 },
- {132, 538}, {136, 538 },
- - {140, 598}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 598}}},
- {104,
- {{36, 636}, {40, 636 },
- {44, 601}, {48, 601 },
- @@ -437,12 +338,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 396},{120, 396 },
- {124, 483}, {128, 483 },
- {132, 553}, {136, 553 },
- - {140, 568}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 568}}},
- {108,
- {{36, 600}, {40, 600 },
- {44, 627}, {48, 627 },
- @@ -453,12 +349,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 323},{120, 323},
- {124, 494},{128, 494},
- {132, 566},{136, 566 },
- - {140, 534}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 534}}},
- {112,
- {{36, 645}, {40, 645 },
- {44, 641}, {48, 641 },
- @@ -469,12 +360,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, 414},{128, 414},
- {132, 533},{136, 533 },
- - {140, 521}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 521}}},
- {116,
- {{36, 661}, {40, 661 },
- {44, 624}, {48, 624 },
- @@ -485,12 +371,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, 309},{128, 309 },
- {132, 412},{136, 412},
- - {140, 509}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 509}}},
- {120,
- {{36, 667}, {40, 667 },
- {44, 645}, {48, 645 },
- @@ -501,12 +382,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, 434},{136, 434},
- - {140, 514}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 514}}},
- {124,
- {{36, 676}, {40, 676 },
- {44, 668}, {48, 668 },
- @@ -517,12 +393,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 225},{120, 225},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, 327},{136, 327},
- - {140, 468}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 468}}},
- {128,
- {{36, 678}, {40, 678 },
- {44, 664}, {48, 664 },
- @@ -533,12 +404,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 293},{120, 293},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, 415}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 415}}},
- {132,
- {{36, 689}, {40, 689 },
- {44, 669}, {48, 669 },
- @@ -549,12 +415,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 428},{120, 428},
- {124, 247},{128, 247},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN }
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN }}},
- {136,
- {{36, 703}, {40, 703 },
- {44, 688}, {48, SAP_TX_LEAKAGE_MIN },
- @@ -565,12 +426,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 428}, {120, 428},
- {124, 289},{128, 289},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN }
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN }}},
- {140,
- {{36, 695}, {40, 695 },
- {44, 684}, {48, 684 },
- @@ -581,11 +437,7 @@ tSapChanMatrixInfo ht40_chan[] =
- {116, 529}, {120, 529},
- {124, 432},{128, 432},
- {132, 262},{136, 262},
- - {140, SAP_TX_LEAKAGE_MIN }
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN }}},
- };
- @@ -602,12 +454,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {56,
- {{36, 468}, {40, 413},
- {44, 374}, {48, 206},
- @@ -618,12 +465,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {60,
- {{36, 507}, {40, 440},
- {44, 431}, {48, 313},
- @@ -634,12 +476,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {64,
- {{36, 516}, {40, 520},
- {44, 506}, {48, 424},
- @@ -650,11 +487,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MAX},{120, SAP_TX_LEAKAGE_MAX},
- {124, SAP_TX_LEAKAGE_MAX},{128, SAP_TX_LEAKAGE_MAX},
- {132, SAP_TX_LEAKAGE_MAX},{136, SAP_TX_LEAKAGE_MAX},
- - {140, SAP_TX_LEAKAGE_MAX}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MAX}}},
- {100,
- {{36, 616}, {40, 601},
- @@ -666,12 +499,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 462}, {120, 522},
- {124, 571}, {128, 589},
- {132, 593}, {136, 598},
- - {140, 594}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 594}}},
- {104,
- {{36, 622}, {40, 624},
- {44, 618}, {48, 610},
- @@ -682,12 +510,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 483},{120, 503},
- {124, 523}, {128, 565},
- {132, 570}, {136, 588},
- - {140, 585}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 585}}},
- {108,
- {{36, 620}, {40, 638},
- {44, 611}, {48, 614},
- @@ -698,12 +521,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 477},{120, 497},
- {124, 517},{128, 537},
- {132, 557},{136, 577},
- - {140, 603}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 603}}},
- {112,
- {{36, 636}, {40, 623},
- {44, 638}, {48, 628},
- @@ -714,12 +532,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, 481},
- {124, 501},{128, 421},
- {132, 541},{136, 561},
- - {140, 583}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 583}}},
- {116,
- {{36, 646}, {40, 648},
- {44, 633}, {48, 634},
- @@ -730,12 +543,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, 534},{136, 554},
- - {140, 574}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 574}}},
- {120,
- {{36, 643}, {40, 649},
- {44, 654}, {48, 629},
- @@ -746,12 +554,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, SAP_TX_LEAKAGE_MIN},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, 505},
- {132, 525},{136, 545},
- - {140, 565}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 565}}},
- {124,
- {{36, 638}, {40, 657},
- {44, 663}, {48, 649},
- @@ -762,12 +565,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 499},{120, SAP_TX_LEAKAGE_MIN},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, 499},{136, 519},
- - {140, 539}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 539}}},
- {128,
- {{36, 651}, {40, 651},
- {44, 674}, {48, 640},
- @@ -778,12 +576,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 499},{120, 479},
- {124, SAP_TX_LEAKAGE_MIN},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, 479},
- - {140, 499}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 499}}},
- {132,
- {{36, 643}, {40, 668},
- {44, 651}, {48, 657},
- @@ -794,12 +587,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 550},{120, 530},
- {124, 510},{128, SAP_TX_LEAKAGE_MIN},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, 490}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, 490}}},
- {136,
- {{36, 654}, {40, 667},
- {44, 666}, {48, 642},
- @@ -810,12 +598,7 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 555}, {120, 535},
- {124, 515},{128, 495},
- {132, SAP_TX_LEAKAGE_MIN},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- -
- + {140, SAP_TX_LEAKAGE_MIN}}},
- {140,
- {{36, 679}, {40, 673},
- {44, 667}, {48, 656},
- @@ -826,13 +609,8 @@ tSapChanMatrixInfo ht20_chan[] =
- {116, 573}, {120, 553},
- {124, 533},{128, 513},
- {132, 490},{136, SAP_TX_LEAKAGE_MIN},
- - {140, SAP_TX_LEAKAGE_MIN}
- -#ifdef FEATURE_WLAN_CH144
- - ,{144, SAP_TX_LEAKAGE_MIN}
- -#endif
- -}},
- + {140, SAP_TX_LEAKAGE_MIN}}},
- };
- -#endif //end of WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- /*----------------------------------------------------------------------------
- @@ -939,33 +717,37 @@ static inline void sapEventInit(ptWLAN_SAPEvent sapEvent)
- sapEvent->u2 = 0;
- }
- -#ifdef WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- /*
- - * This function gives the leakage matrix for given NOL channel and cbMode
- + * This function is added to check if channel is in tx leak range
- *
- * PARAMETERS
- * IN
- - * sapContext : Pointer to vos global context structure
- - * cbMode : target channel bonding mode
- - * NOL_channel : the NOL channel whose leakage matrix is required
- - * pTarget_chnl_mtrx : pointer to target channel matrix returned.
- + * sapContext: Pointer to vos global context structure
- + * target_channel: the target channel to switch to
- *
- * RETURN VALUE
- - * BOOLEAN
- - * TRUE: leakage matrix was found
- - * FALSE: leakage matrix was not found
- + * BOOLEAN to indicate if the target channel is good or bad to switch
- + *
- + * TRUE: the channel is above the tx leak threshold, CANNOT USE
- + * FALSE: the channel is below the tx leak threshold, CAN BE USED
- */
- v_BOOL_t
- -sapFindTargetChannelInChannelMatrix(ptSapContext sapContext,
- - ePhyChanBondState cbMode,
- - v_U8_t NOL_channel,
- - tSapTxLeakInfo **pTarget_chnl_mtrx)
- +sapChannelMatrixCheck(ptSapContext sapContext,
- + ePhyChanBondState cbMode,
- + v_U8_t target_channel)
- {
- tSapTxLeakInfo *target_chan_matrix = NULL;
- tSapChanMatrixInfo *pchan_matrix = NULL;
- + v_U32_t num_channel = (RF_CHAN_140 - RF_CHAN_36) + 1;
- v_U32_t nchan_matrix;
- + tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
- int i = 0;
- + if (NULL == hHal) {
- + VOS_ASSERT(0);
- + return VOS_FALSE;
- + }
- +
- switch (cbMode) {
- case PHY_SINGLE_CHANNEL_CENTERED:
- /* HT20 */
- @@ -998,7 +780,7 @@ sapFindTargetChannelInChannelMatrix(ptSapContext sapContext,
- for (i = 0; i < nchan_matrix; i++)
- {
- /* find the SAP channel to map the leakage matrix */
- - if (NOL_channel == pchan_matrix[i].channel)
- + if (sapContext->channel == pchan_matrix[i].channel)
- {
- target_chan_matrix = pchan_matrix[i].chan_matrix;
- break;
- @@ -1007,112 +789,45 @@ sapFindTargetChannelInChannelMatrix(ptSapContext sapContext,
- if (NULL == target_chan_matrix)
- {
- + /* should never happen, we should ind a table here,
- + * if we don't, need a fix here!
- + */
- +
- + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- + FL("Shouldn't see this message! something went wrong here!"));
- +
- + VOS_ASSERT(0);
- return VOS_FALSE;
- - } else {
- - *pTarget_chnl_mtrx = target_chan_matrix;
- - return VOS_TRUE;
- }
- -}
- -
- -/*
- - * This function removes the channels from temp channel list that
- - * (if selected as target channel) will cause leakage in one of
- - * the NOL channels
- - *
- - * PARAMETERS
- - * IN
- - * sapContext : Pointer to vos global context structure
- - * cbMode : target channel bonding mode
- - * pNol : DFS NOL
- - * pTempChannelList : the target channel list
- - *
- - * RETURN VALUE
- - * VOS_STATUS code associated with performing the operation
- - */
- -VOS_STATUS
- -sapMarkChannelsLeakingIntoNOL(ptSapContext sapContext,
- - ePhyChanBondState cbMode,
- - tSapDfsNolInfo *pNol,
- - v_U8_t tempChannelListSize,
- - v_U8_t *pTempChannelList)
- -{
- - tSapTxLeakInfo *target_chan_matrix = NULL;
- -#ifdef FEATURE_WLAN_CH144
- - v_U32_t num_channel = (RF_CHAN_144 - RF_CHAN_36) + 1;
- -#else
- - v_U32_t num_channel = (RF_CHAN_140 - RF_CHAN_36) + 1;
- -#endif
- - v_U32_t i = 0;
- - v_U32_t j = 0;
- - v_U32_t k = 0;
- - v_U8_t dfs_nol_channel;
- -
- -
- - /* traverse target_chan_matrix and */
- - for (i = 0; i < NUM_5GHZ_CHANNELS ; i++) {
- - dfs_nol_channel = pNol[i].dfs_channel_number;
- - if ( pNol[i].radar_status_flag == eSAP_DFS_CHANNEL_USABLE ||
- - pNol[i].radar_status_flag == eSAP_DFS_CHANNEL_AVAILABLE ) {
- - /* not present in NOL */
- - continue;
- - }
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_DEBUG,
- - FL("sapdfs: processing NOL channel: %d"),
- - dfs_nol_channel );
- - if (VOS_FALSE == sapFindTargetChannelInChannelMatrix(sapContext,
- - cbMode,
- - dfs_nol_channel,
- - &target_chan_matrix))
- + for (i = 0; i < num_channel; i++)
- + {
- + if (target_channel == target_chan_matrix[i].leak_chan)
- {
- - /*
- - * should never happen, we should always find a table here,
- - * if we don't, need a fix here!
- - */
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- - FL("Couldn't find target channel matrix!"));
- - VOS_ASSERT(0);
- - return VOS_STATUS_E_FAILURE;
- - }
- + if (target_chan_matrix[i].leak_lvl > SAP_TX_LEAKAGE_THRES) {
- + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- + FL("Channel=%d is good"),
- + target_channel);
- - /*
- - * following is based on assumption that both pTempChannelList
- - * and target channel matrix are in increasing order of channelID
- - */
- - for (j = 0, k = 0; j < tempChannelListSize &&
- - k < num_channel; ) {
- - if (pTempChannelList[j] == 0) {
- - j++;
- + return VOS_FALSE;
- } else {
- - if (target_chan_matrix[k].leak_chan != pTempChannelList[j]) {
- - k++;
- - } else {
- - /* check leakage from candidate channel to NOL channel */
- - if (target_chan_matrix[k].leak_lvl <= SAP_TX_LEAKAGE_THRES)
- - {
- - /*
- - * this means that candidate channel will have bad
- - * leakage in NOL channel, remove the candidate channel
- - * from temp list
- - */
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
- - FL("sapdfs: channel: %d will have bad leakage"
- - " due to channel: %d\n"),
- - dfs_nol_channel,
- - pTempChannelList[j]);
- - pTempChannelList[j] = 0;
- - break;
- - }
- - j++;
- - k++;
- - }
- + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- + FL("Channel=%d has leakage=-%d dBm"),
- + target_channel, (target_chan_matrix[i].leak_lvl/10));
- + return VOS_TRUE;
- }
- - } /* end of for loop checking temp channel list leakage into NOL */
- - } /* end of loop that selects each NOL */
- - return VOS_STATUS_SUCCESS;
- -}
- + }
- + }
- -#endif // end of WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- + /* should never happen, we should find a table here,
- + * if we don't, need a fix here
- + */
- + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- + FL("Channel=%d is not in the list"),
- + target_channel);
- +
- + return VOS_FALSE;
- +}
- /*
- * This function adds availabe channel to bitmap
- @@ -1332,7 +1047,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- {
- v_U32_t random_byte = 0;
- v_U8_t available_chnl_count = 0;
- - v_U8_t valid_chnl_count = 0;
- v_U8_t availableChannels[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0,};
- v_U8_t target_channel = 0;
- v_BOOL_t isChannelNol = VOS_FALSE;
- @@ -1345,7 +1059,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- tANI_U32 chanWidth;
- ePhyChanBondState cbModeCurrent;
- v_REGDOMAIN_t regDomain;
- - v_U8_t *tempChannels = NULL;
- if (NULL == hHal) {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- @@ -1395,17 +1108,12 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- if (sapGet5GHzChannelList(sapContext))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
- - FL("Getting 5Ghz channel list failed"));
- + FL("Get 5Ghz channel list failed"));
- return target_channel;
- }
- regDomain = sapFetchRegulatoryDomain(hHal);
- - /*
- - * valid_chnl_count will be used to find number of valid channels
- - * after following for loop ends
- - */
- - valid_chnl_count = sapContext->SapAllChnlList.numChannel;
- /* loop to check ACS range or NOL channels */
- for (i = 0; i < sapContext->SapAllChnlList.numChannel; i++)
- {
- @@ -1439,8 +1147,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- FL("index:%d, Channel=%d Invalid,Japan W53 Disabled"),
- i, channelID);
- sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
- - valid_chnl_count--;
- - continue;
- }
- /*
- @@ -1458,8 +1164,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- channelID,
- pMac->sap.SapDfsInfo.sap_operating_chan_preferred_location);
- sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
- - valid_chnl_count--;
- - continue;
- }
- }
- @@ -1475,11 +1179,9 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- * DFS Non-Occupancy-Period which is 30 mins.
- */
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_LOW,
- - FL("index: %d, Channel = %d Present in NOL"),
- + FL("index: %d, Channel = %d Present in NOL LIST"),
- i, channelID);
- sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
- - valid_chnl_count--;
- - continue;
- }
- }
- @@ -1495,86 +1197,44 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- FL("index: %d, Channel = %d out of ACS channel range"),
- i, channelID);
- sapContext->SapAllChnlList.channelList[i].valid = VOS_FALSE;
- - valid_chnl_count--;
- - continue;
- }
- } /* end of check for NOL or ACS channels */
- - /* valid_chnl_count now have number of valid channels */
- - tempChannels = vos_mem_malloc(valid_chnl_count);
- - if (tempChannels == NULL) {
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- - FL("sapdfs: memory alloc failed"));
- - return target_channel;
- - }
- -
- do
- {
- - v_U8_t j = 0;
- -#ifdef WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- - tSapDfsNolInfo *pNol = pMac->sap.SapDfsInfo.sapDfsChannelNolList;
- -#endif
- -
- - /* prepare temp list of just the valid channels */
- - for (i = 0; i < sapContext->SapAllChnlList.numChannel; i++) {
- - if (sapContext->SapAllChnlList.channelList[i].valid) {
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- - FL("sapdfs: Adding Channel = %d to temp List"),
- - sapContext->SapAllChnlList.channelList[i].channel);
- - tempChannels[j++] =
- - sapContext->SapAllChnlList.channelList[i].channel;
- - }
- - }
- -
- -#ifdef WLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- - FL("sapdfs: Processing temp channel list against NOL."));
- - if (VOS_STATUS_SUCCESS != sapMarkChannelsLeakingIntoNOL(sapContext,
- - cbModeCurrent,
- - pNol,
- - valid_chnl_count,
- - tempChannels)) {
- - vos_mem_free(tempChannels);
- - return target_channel;
- - }
- -#endif
- - vos_mem_zero(availableChannels, sizeof(availableChannels));
- vos_mem_zero(&channelBitmap, sizeof(channelBitmap));
- channelBitmap.chanBondingSet[0].startChannel = 36;
- channelBitmap.chanBondingSet[1].startChannel = 52;
- channelBitmap.chanBondingSet[2].startChannel = 100;
- channelBitmap.chanBondingSet[3].startChannel = 116;
- - channelBitmap.chanBondingSet[3].startChannel = 132;
- channelBitmap.chanBondingSet[4].startChannel = 149;
- + vos_mem_zero(availableChannels, sizeof(availableChannels));
- /* now loop through whatever is left of channel list */
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- - FL("sapdfs: Moving temp channel list to final."));
- - for (i = 0; i < valid_chnl_count; i++ ){
- - /*
- - * add channel from temp channel list to bitmap or fianl
- - * channel list (in case of 20MHz width)
- - */
- - if (tempChannels[i] != 0) {
- - VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_DEBUG,
- - FL("sapdfs: processing channel: %d "),
- - tempChannels[i]);
- - /* for 20MHz, directly create available channel list */
- - if (cbModeCurrent == PHY_SINGLE_CHANNEL_CENTERED) {
- - VOS_TRACE(VOS_MODULE_ID_SAP,
- - VOS_TRACE_LEVEL_DEBUG,
- - FL("sapdfs: Channel=%d added to available list"),
- - tempChannels[i]);
- - availableChannels[available_chnl_count++] =
- - tempChannels[i];
- - } else {
- - VOS_TRACE(VOS_MODULE_ID_SAP,
- - VOS_TRACE_LEVEL_DEBUG,
- - FL("sapdfs: Channel=%d added to bitmap"),
- - tempChannels[i]);
- - sapSetBitmap(&channelBitmap, tempChannels[i]);
- + for (i = 0; i < sapContext->SapAllChnlList.numChannel; i++ ){
- + /* check the channel matrix */
- + if (sapContext->SapAllChnlList.channelList[i].valid) {
- + channelID = sapContext->SapAllChnlList.channelList[i].channel;
- + /* if leakage for this channel is within limits */
- + if (VOS_FALSE == sapChannelMatrixCheck(sapContext,
- + cbModeCurrent,
- + channelID)) {
- + /* for 20MHz, directly create available channel list */
- + if (cbModeCurrent == PHY_SINGLE_CHANNEL_CENTERED) {
- + VOS_TRACE(VOS_MODULE_ID_SAP,
- + VOS_TRACE_LEVEL_INFO_LOW,
- + FL("Channel=%d added to available list"),
- + channelID);
- + availableChannels[available_chnl_count++] = channelID;
- + } else {
- + VOS_TRACE(VOS_MODULE_ID_SAP,
- + VOS_TRACE_LEVEL_INFO_LOW,
- + FL("Channel=%d added to bitmap"),
- + channelID);
- + sapSetBitmap(&channelBitmap, channelID);
- + }
- }
- }
- - }
- + } /* end of loop to check against DFS leakage channel matrix */
- /* if 40 MHz or 80 MHz, populate available channel list from bitmap */
- if (cbModeCurrent != PHY_SINGLE_CHANNEL_CENTERED) {
- @@ -1652,7 +1312,6 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
- break;
- } while(1); /* this loop will iterate at max 3 times */
- - vos_mem_free(tempChannels);
- return target_channel;
- }
- @@ -4403,13 +4062,6 @@ v_U8_t sapIndicateRadar(ptSapContext sapContext, tSirSmeDfsEventInd *dfs_event)
- return 0;
- }
- - /*
- - * SAP needs to generate Channel Switch IE
- - * if the radar is found in the STARTED state
- - */
- - if (eSAP_STARTED == sapContext->sapsMachine)
- - pMac->sap.SapDfsInfo.csaIERequired = VOS_TRUE;
- -
- if (sapContext->csrRoamProfile.disableDFSChSwitch)
- {
- return sapContext->channel;
- @@ -4418,6 +4070,12 @@ v_U8_t sapIndicateRadar(ptSapContext sapContext, tSirSmeDfsEventInd *dfs_event)
- /* set the Radar Found flag in SapDfsInfo */
- pMac->sap.SapDfsInfo.sap_radar_found_status = VOS_TRUE;
- + /* We need to generate Channel Switch IE if the radar is found in the
- + * operating state
- + */
- + if (eSAP_STARTED == sapContext->sapsMachine)
- + pMac->sap.SapDfsInfo.csaIERequired = VOS_TRUE;
- +
- sapGet5GHzChannelList(sapContext);
- if (dfs_event->chan_list.nchannels > SIR_DFS_MAX_20M_SUB_CH) {
- diff --git a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapModule.c b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapModule.c
- index 0786da6..519a85c 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SAP/src/sapModule.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SAP/src/sapModule.c
- @@ -644,7 +644,6 @@ WLANSAP_StartBss
- ptSapContext pSapCtx = NULL;
- tANI_BOOLEAN restartNeeded;
- tHalHandle hHal;
- - tpAniSirGlobal pmac = NULL;
- int ret;
- /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
- @@ -736,13 +735,6 @@ WLANSAP_StartBss
- }
- }
- - pmac = PMAC_STRUCT( hHal );
- - /*
- - * Copy the DFS Test Mode setting to pmac for
- - * access in lower layers
- - */
- - pmac->sap.SapDfsInfo.disable_dfs_ch_switch =
- - pConfig->disableDFSChSwitch;
- // Copy MAC filtering settings to sap context
- pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
- vos_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac, sizeof(pConfig->accept_mac));
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/BMI/ol_fw.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/BMI/ol_fw.c
- index 7a0c1db..1c18be6 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/BMI/ol_fw.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/BMI/ol_fw.c
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -57,9 +57,62 @@
- #include "qwlan_version.h"
- #ifdef FEATURE_SECURE_FIRMWARE
- -#define MAX_FIRMWARE_SIZE (1*1024*1024)
- static u8 fw_mem[MAX_FIRMWARE_SIZE];
- +static struct hash_fw fw_hash = {
- +
- +/* qwlan30.bin sha256sum hash */
- +{
- +0xad, 0x18, 0xb6, 0x6e, 0x59, 0x49, 0x34, 0x82, 0x1e, 0x09,
- +0x07, 0x3b, 0x00, 0xe8, 0xfa, 0x1e, 0x70, 0xb9, 0x22, 0xa9,
- +0x93, 0xc1, 0xef, 0xd7, 0x14, 0xef, 0x36, 0xb8, 0x5e, 0x7d,
- +0xea, 0xd7,
- +},
- +
- +/* otp30.bin sha256sum hash */
- +{
- +0xf8, 0x46, 0x08, 0x53, 0x25, 0x9d, 0xd2, 0x1f, 0xeb, 0x12,
- +0xc5, 0x22, 0x14, 0x22, 0x1a, 0xf5, 0x35, 0x15, 0xff, 0xf7,
- +0x1a, 0xa7, 0x5f, 0x79, 0x44, 0xd7, 0xfe, 0x58, 0xe1, 0xf3,
- +0xed, 0xd4,
- +},
- +
- +/* bdwlan30.bin sha256sum hash */
- +#ifdef CONFIG_MSM8994
- +{
- +0x9c, 0x4f, 0xb2, 0xd3, 0x9a, 0xbf, 0xf0, 0x0a, 0x5f, 0x78,
- +0x92, 0xcf, 0x03, 0x58, 0x03, 0xfc, 0x5a, 0xb6, 0xd8, 0xa0,
- +0xfb, 0x6d, 0xcc, 0x7b, 0x4e, 0x06, 0x67, 0xda, 0x0e, 0xfd,
- +0xd9, 0x1f,
- +},
- +#else /* Clark */
- +#ifdef CNSS_LOCALE_argentina
- +{
- +0x0f, 0xcb, 0xcd, 0x2b, 0x8f, 0x5c, 0xb5, 0xd8, 0xdc, 0xbd,
- +0x91, 0xaf, 0x29, 0x27, 0x11, 0x73, 0xce, 0x11, 0x7d, 0x8d,
- +0x5a, 0x6c, 0x5e, 0x22, 0xb1, 0x29, 0x65, 0x7a, 0x18, 0x87,
- +0x29, 0xc5,
- +},
- +#else
- +{
- +0x26, 0xdd, 0xa9, 0xc1, 0xc1, 0x61, 0xb9, 0xb4, 0xbb, 0xf8,
- +0xac, 0xc0, 0xa8, 0xd0, 0x39, 0xa7, 0x83, 0xe6, 0x12, 0x20,
- +0x94, 0xb5, 0xa7, 0x3c, 0xf3, 0xc0, 0xb9, 0xd7, 0x13, 0x8f,
- +0x96, 0xac,
- +},
- +#endif
- +#endif
- +
- +/* utf30.bin sha256sum hash */
- +{
- +0x7f, 0x1f, 0xae, 0xd8, 0x8b, 0xeb, 0xb4, 0x3f, 0xa2,
- +0x2a, 0x43, 0x15, 0x48, 0x81, 0x53, 0xdf, 0xfb, 0x1e, 0x79,
- +0x46, 0x75, 0x38, 0xd9, 0xf6, 0x9e, 0x67, 0xd8, 0xbf, 0xf8,
- +0xce, 0x3f, 0x67,
- +},
- +
- +};
- +#else
- static struct hash_fw fw_hash;
- #endif
- @@ -934,7 +987,7 @@ static void ramdump_work_handler(struct work_struct *ramdump)
- goto out_fail;
- printk("%s: RAM dump collecting completed!\n", __func__);
- -
- + msleep(250);
- #if defined(HIF_SDIO)
- panic("CNSS Ram dump collected\n");
- #else
- @@ -1107,8 +1160,6 @@ void ol_ramdump_handler(struct ol_softc *scn)
- void ol_target_failure(void *instance, A_STATUS status)
- {
- struct ol_softc *scn = (struct ol_softc *)instance;
- - void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
- - tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context);
- #ifndef CONFIG_CNSS
- A_UINT32 reg_dump_area = 0;
- A_UINT32 reg_dump_values[REGISTER_DUMP_LEN_MAX];
- @@ -1118,6 +1169,8 @@ void ol_target_failure(void *instance, A_STATUS status)
- struct dbglog_hdr_host dbglog_hdr;
- struct dbglog_buf_host dbglog_buf;
- A_UINT8 *dbglog_data;
- + void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
- + tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context);
- #else
- int ret;
- #endif
- @@ -1131,8 +1184,6 @@ void ol_target_failure(void *instance, A_STATUS status)
- }
- #endif
- - vos_event_set(&wma->recovery_event);
- -
- if (OL_TRGET_STATUS_RESET == scn->target_status) {
- printk("Target is already asserted, ignore!\n");
- return;
- @@ -1140,11 +1191,6 @@ void ol_target_failure(void *instance, A_STATUS status)
- scn->target_status = OL_TRGET_STATUS_RESET;
- - if (vos_is_logp_in_progress(VOS_MODULE_ID_VOSS, NULL)) {
- - pr_info("%s: LOGP is in progress, ignore!\n", __func__);
- - return;
- - }
- -
- if (vos_is_load_unload_in_progress(VOS_MODULE_ID_VOSS, NULL)) {
- printk("%s: Loading/Unloading is in progress, ignore!\n",
- __func__);
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/adf_os_timer.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/adf_os_timer.h
- index fdbe312..0a0088e 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/adf_os_timer.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/adf_os_timer.h
- @@ -58,10 +58,9 @@ static inline void
- adf_os_timer_init(adf_os_handle_t hdl,
- adf_os_timer_t *timer,
- adf_os_timer_func_t func,
- - void *arg,
- - uint8_t type)
- + void *arg)
- {
- - __adf_os_timer_init(hdl, timer, func, arg, type);
- + __adf_os_timer_init(hdl, timer, func, arg);
- }
- /**
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_timer_pvt.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_timer_pvt.h
- index b57b1b6..e4cb74b 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_timer_pvt.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_timer_pvt.h
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -35,9 +35,6 @@
- #include <linux/jiffies.h>
- #include <adf_os_types.h>
- -#define ADF_DEFERRABLE_TIMER 0
- -#define ADF_NON_DEFERRABLE_TIMER 1
- -
- /*
- * timer data type
- */
- @@ -56,13 +53,9 @@ static inline a_status_t
- __adf_os_timer_init(adf_os_handle_t hdl,
- struct timer_list *timer,
- adf_os_timer_func_t func,
- - void *arg,
- - uint8_t type)
- + void *arg)
- {
- - if (ADF_DEFERRABLE_TIMER == type)
- - init_timer_deferrable(timer);
- - else
- - init_timer(timer);
- + init_timer(timer);
- timer->function = (adf_dummy_timer_func_t)func;
- timer->data = (unsigned long)arg;
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/dbglog.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/dbglog.h
- index 9874ac8..c7ac9e9 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/dbglog.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/dbglog.h
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2012, 2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2012 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -63,8 +63,8 @@ extern "C" {
- #define DBGLOG_NUM_ARGS_OFFSET 26
- #define DBGLOG_NUM_ARGS_MASK 0xFC000000 /* Bit 26-31 */
- -#define DBGLOG_NUM_ARGS_MAX 9 /* it is bcoz of limitation
- - of corebsp MSG*() to accept max 9 arg */
- +#define DBGLOG_NUM_ARGS_MAX 5 /* it is limited bcoz of limitations
- + with Xtensa tool */
- #define DBGLOG_LOG_BUFFER_SIZE 1500
- #define DBGLOG_DBGID_DEFINITION_LEN_MAX 90
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/htc.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/htc.h
- index dd6ecb5..93033a9 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/htc.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/htc.h
- @@ -92,9 +92,9 @@ typedef PREPACK struct _HTC_FRAME_HDR{
- /***** end of 4-byte lookahead ****/
- - A_UINT32 ControlBytes0 : 8, /* used for CRC check if CRC_CHECK flag set */
- - ControlBytes1 : 8, /* used for seq check if SEQ_CHECK flag set */
- - reserved : 16; /* used by bundle processing in SDIO systems */
- + A_UINT32 ControlBytes0 : 8,
- + ControlBytes1 : 8,
- + reserved : 16;
- /* message payload starts after the header */
- @@ -124,10 +124,6 @@ typedef PREPACK struct _HTC_FRAME_HDR{
- /* send direction */
- #define HTC_FLAGS_NEED_CREDIT_UPDATE (1 << 0)
- #define HTC_FLAGS_SEND_BUNDLE (1 << 1) /* start or part of bundle */
- -#define HTC_FLAGS_SEQ_CHECK (1 << 2) /* seq check on rx side */
- -#define HTC_FLAGS_CRC CHECK (1 << 3) /* CRC check on rx side */
- -
- -
- /* receive direction */
- #define HTC_FLAGS_RECV_UNUSED_0 (1 << 0) /* bit 0 unused */
- #define HTC_FLAGS_RECV_TRAILER (1 << 1) /* bit 1 trailer data present */
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
- index f2cf10a..af1904b 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
- @@ -61,7 +61,6 @@ enum wlan_op_mode {
- #define OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED (1 << 1)
- #define OL_TXQ_PAUSE_REASON_TX_ABORT (1 << 2)
- #define OL_TXQ_PAUSE_REASON_VDEV_STOP (1 << 3)
- -#define OL_TXQ_PAUSE_REASON_VDEV_SUSPEND (1 << 4)
- /**
- * @brief Set up the data SW subsystem.
- @@ -394,45 +393,37 @@ ol_txrx_throttle_unpause(ol_txrx_pdev_handle data_pdev);
- #endif /* CONFIG_HL_SUPPORT */
- /**
- - * ol_txrx_pdev_pause() - Suspend all tx data for the specified physical device.
- - * @data_pdev: the physical device being paused.
- - * @reason: pause reason.
- - * One can provide multiple line descriptions
- - * for arguments.
- - *
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- - * In some systems it is necessary to be able to temporarily
- - * suspend all WLAN traffic, e.g. to allow another device such as bluetooth
- - * to temporarily have exclusive access to shared RF chain resources.
- - * This function suspends tx traffic within the specified physical device.
- - *
- + * @brief Suspend all tx data for the specified physical device.
- + * @details
- + * This function applies only to HL systems - in LL systems, tx flow control
- + * is handled entirely within the target FW.
- + * In some systems it is necessary to be able to temporarily
- + * suspend all WLAN traffic, e.g. to allow another device such as bluetooth
- + * to temporarily have exclusive access to shared RF chain resources.
- + * This function suspends tx traffic within the specified physical device.
- *
- - * Return: None
- + * @param data_pdev - the physical device being paused
- */
- -#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- +#if defined(CONFIG_HL_SUPPORT)
- void
- -ol_txrx_pdev_pause(ol_txrx_pdev_handle data_pdev, u_int32_t reason);
- +ol_txrx_pdev_pause(ol_txrx_pdev_handle data_pdev);
- #else
- -#define ol_txrx_pdev_pause(data_pdev,reason) /* no-op */
- +#define ol_txrx_pdev_pause(data_pdev) /* no-op */
- #endif /* CONFIG_HL_SUPPORT */
- /**
- - * ol_txrx_pdev_unpause() - Resume tx for the specified physical device..
- - * @data_pdev: the physical device being paused.
- - * @reason: pause reason.
- - *
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- - *
- + * @brief Resume tx for the specified physical device.
- + * @details
- + * This function applies only to HL systems - in LL systems, tx flow control
- + * is handled entirely within the target FW.
- *
- - * Return: None
- + * @param data_pdev - the physical device being unpaused
- */
- -#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- +#if defined(CONFIG_HL_SUPPORT)
- void
- -ol_txrx_pdev_unpause(ol_txrx_pdev_handle data_pdev, u_int32_t reason);
- +ol_txrx_pdev_unpause(ol_txrx_pdev_handle data_pdev);
- #else
- -#define ol_txrx_pdev_unpause(data_pdev,reason) /* no-op */
- +#define ol_txrx_pdev_unpause(data_pdev) /* no-op */
- #endif /* CONFIG_HL_SUPPORT */
- /**
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osapi_linux.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osapi_linux.h
- index 6a85175..79cfecc 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osapi_linux.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osapi_linux.h
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -170,7 +170,7 @@ typedef spinlock_t A_MUTEX_T;
- typedef struct timer_list A_TIMER;
- #define A_INIT_TIMER(pTimer, pFunction, pArg) do { \
- - init_timer_deferrable(pTimer); \
- + init_timer(pTimer); \
- (pTimer)->function = (pFunction); \
- (pTimer)->data = (unsigned long)(pArg); \
- } while (0)
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osdep_adf.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osdep_adf.h
- index 8739f87..708b6f8 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osdep_adf.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/osdep_adf.h
- @@ -641,7 +641,7 @@ typedef dma_addr_t * dma_context_t;
- (_arg) = (_type)(timer_arg)
- -#define OS_INIT_TIMER(_osdev, _timer, _fn, _ctx, type) adf_os_timer_init(_osdev, _timer, _fn, _ctx, type)
- +#define OS_INIT_TIMER(_osdev, _timer, _fn, _ctx) adf_os_timer_init(_osdev, _timer, _fn, _ctx)
- #define OS_SET_TIMER(_timer, _ms) adf_os_timer_mod(_timer, _ms)
- @@ -767,8 +767,7 @@ static INLINE int OS_MESGQ_INIT(osdev_t devhandle, os_mesg_queue_t *queue,
- #ifdef USE_SOFTINTR
- queue->_task = softintr_establish(IPL_SOFTNET,os_mesgq_handler,(void *)queue);
- #else
- - OS_INIT_TIMER(devhandle,&queue->_timer, os_mesgq_handler, queue,
- - ADF_DEFERRABLE_TIMER);
- + OS_INIT_TIMER(devhandle,&queue->_timer, os_mesgq_handler, queue);
- #endif
- return 0;
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/targaddrs.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/targaddrs.h
- index 0cec68f..4f91698 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/targaddrs.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/targaddrs.h
- @@ -1,5 +1,5 @@
- /*
- - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
- + * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- @@ -369,10 +369,6 @@ PREPACK64 struct host_interest_s {
- #define HI_OPTION_USE_EXT_LDO 0x40 /* use LDO27 for 1.1V instead of PMU */
- #define HI_OPTION_DBUART_SUPPORT 0x80 /* Enable uart debug support */
- -#define HT_OPTION_GPIO_WAKEUP_SUPPORT 0x200 /* GPIO wake up support */
- -
- -#define GPIO_WAKEUP_ENABLED() \
- - (HOST_INTEREST->hi_option_flag2 & HT_OPTION_GPIO_WAKEUP_SUPPORT)
- /* hi_reset_flag */
- #define HI_RESET_FLAG_PRESERVE_APP_START 0x01 /* preserve App Start address */
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wdi_in.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wdi_in.h
- index c81497d..10fd92c 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wdi_in.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wdi_in.h
- @@ -350,38 +350,36 @@ wdi_in_vdev_unpause(ol_txrx_vdev_handle data_vdev, u_int32_t reason);
- /**
- * @brief Suspend all tx data for the specified physical device.
- * @details
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- + * This function applies only to HL systems - in LL systems, tx flow control
- + * is handled entirely within the target FW.
- * In some systems it is necessary to be able to temporarily
- * suspend all WLAN traffic, e.g. to allow another device such as bluetooth
- * to temporarily have exclusive access to shared RF chain resources.
- * This function suspends tx traffic within the specified physical device.
- *
- * @param data_pdev - the physical device being paused
- - * @param reason - pause reason
- */
- -#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- +#if defined(CONFIG_HL_SUPPORT)
- void
- -wdi_in_pdev_pause(ol_txrx_pdev_handle data_pdev, u_int32_t reason);
- +wdi_in_pdev_pause(ol_txrx_pdev_handle data_pdev);
- #else
- -#define wdi_in_pdev_pause(data_pdev, reason) /* no-op */
- -#endif
- +#define wdi_in_pdev_pause(data_pdev) /* no-op */
- +#endif /* CONFIG_HL_SUPPORT */
- /**
- * @brief Resume tx for the specified physical device.
- * @details
- - * This function applies to HL systems -
- - * in LL systems, applies when txrx_vdev_pause_all is enabled.
- + * This function applies only to HL systems - in LL systems, tx flow control
- + * is handled entirely within the target FW.
- *
- * @param data_pdev - the physical device being unpaused
- - * @param reason - pause reason
- */
- -#if defined(CONFIG_HL_SUPPORT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
- +#if defined(CONFIG_HL_SUPPORT)
- void
- -wdi_in_pdev_unpause(ol_txrx_pdev_handle data_pdev, u_int32_t reason);
- +wdi_in_pdev_unpause(ol_txrx_pdev_handle data_pdev);
- #else
- -#define wdi_in_pdev_unpause(data_pdev, reason) /* no-op */
- -#endif
- +#define wdi_in_pdev_unpause(data_pdev) /* no-op */
- +#endif /* CONFIG_HL_SUPPORT */
- /**
- * @brief Synchronize the data-path tx with a control-path target download
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_defs.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_defs.h
- index ce2a166..bcab123 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_defs.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_defs.h
- @@ -37,12 +37,12 @@
- #define __WLANDEFS_H__
- #include <a_osapi.h> /* A_COMPILE_TIME_ASSERT */
- -#include <osdep.h>
- /*
- * This file contains WLAN definitions that may be used across both
- * Host and Target software.
- */
- +
- /*
- * MAX_SPATIAL_STREAM should be defined in a fwconfig_xxx.h file,
- * but for now provide a default value here in case it's not defined
- @@ -160,30 +160,29 @@ typedef enum {
- enum {
- - REGDMN_MODE_11A = 0x00000001, /* 11a channels */
- - REGDMN_MODE_TURBO = 0x00000002, /* 11a turbo-only channels */
- - REGDMN_MODE_11B = 0x00000004, /* 11b channels */
- - REGDMN_MODE_PUREG = 0x00000008, /* 11g channels (OFDM only) */
- - REGDMN_MODE_11G = 0x00000008, /* XXX historical */
- - REGDMN_MODE_108G = 0x00000020, /* 11g+Turbo channels */
- - REGDMN_MODE_108A = 0x00000040, /* 11a+Turbo channels */
- - REGDMN_MODE_XR = 0x00000100, /* XR channels */
- - REGDMN_MODE_11A_HALF_RATE = 0x00000200, /* 11A half rate channels */
- - REGDMN_MODE_11A_QUARTER_RATE = 0x00000400, /* 11A quarter rate channels */
- - REGDMN_MODE_11NG_HT20 = 0x00000800, /* 11N-G HT20 channels */
- - REGDMN_MODE_11NA_HT20 = 0x00001000, /* 11N-A HT20 channels */
- - REGDMN_MODE_11NG_HT40PLUS = 0x00002000, /* 11N-G HT40 + channels */
- - REGDMN_MODE_11NG_HT40MINUS = 0x00004000, /* 11N-G HT40 - channels */
- - REGDMN_MODE_11NA_HT40PLUS = 0x00008000, /* 11N-A HT40 + channels */
- - REGDMN_MODE_11NA_HT40MINUS = 0x00010000, /* 11N-A HT40 - channels */
- - REGDMN_MODE_11AC_VHT20 = 0x00020000, /* 5Ghz, VHT20 */
- - REGDMN_MODE_11AC_VHT40PLUS = 0x00040000, /* 5Ghz, VHT40 + channels */
- - REGDMN_MODE_11AC_VHT40MINUS = 0x00080000, /* 5Ghz VHT40 - channels */
- - REGDMN_MODE_11AC_VHT80 = 0x000100000, /* 5Ghz, VHT80 channels */
- - REGDMN_MODE_11AC_VHT20_2G = 0x000200000, /* 2Ghz, VHT20 */
- - REGDMN_MODE_11AC_VHT40_2G = 0x000400000, /* 2Ghz, VHT40 */
- - REGDMN_MODE_11AC_VHT80_2G = 0x000800000, /* 2Ghz, VHT80 */
- - REGDMN_MODE_11AC_VHT160 = 0x001000000, /* 5Ghz, VHT160 */
- + REGDMN_MODE_11A = 0x00001, /* 11a channels */
- + REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
- + REGDMN_MODE_11B = 0x00004, /* 11b channels */
- + REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
- + REGDMN_MODE_11G = 0x00008, /* XXX historical */
- + REGDMN_MODE_108G = 0x00020, /* 11g+Turbo channels */
- + REGDMN_MODE_108A = 0x00040, /* 11a+Turbo channels */
- + REGDMN_MODE_XR = 0x00100, /* XR channels */
- + REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
- + REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
- + REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
- + REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
- + REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
- + REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
- + REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
- + REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
- + REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
- + REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
- + REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
- + REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
- + REGDMN_MODE_11AC_VHT20_2G = 0x200000, /* 2Ghz, VHT20 */
- + REGDMN_MODE_11AC_VHT40_2G = 0x400000, /* 2Ghz, VHT40 */
- + REGDMN_MODE_11AC_VHT80_2G = 0x800000, /* 2Ghz, VHT80 */
- };
- #define REGDMN_MODE_ALL (0xFFFFFFFF) /* REGDMN_MODE_ALL is defined out of the enum
- @@ -298,8 +297,6 @@ typedef A_UINT8 A_RATE;
- #error "Extend rate table module first"
- #endif
- -#define MAX_IBSS_PEERS 32
- -
- #if defined(CONFIG_AR900B_SUPPORT) || defined(AR900B)
- typedef struct{
- A_UINT32 psdu_len [NUM_DYN_BW * NUM_SCHED_ENTRIES];
- @@ -365,7 +362,6 @@ typedef struct{
- A_UINT8 sh_pream;
- A_UINT8 bw_in_service;
- A_RATE probe_rix;
- - A_UINT8 dd_profile;
- } RC_TX_RATE_INFO;
- /*
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_module_ids.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_module_ids.h
- index 8596a8c..348085d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_module_ids.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wlan_module_ids.h
- @@ -86,8 +86,6 @@ typedef enum {
- WLAN_MODULE_UNIT_TEST,
- WLAN_MODULE_MLME,
- WLAN_MODULE_SUPPL,
- - WLAN_MODULE_ERE,
- - WLAN_MODULE_OCB,
- WLAN_MODULE_ID_MAX,
- WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX,
- } WLAN_MODULE_ID;
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_tlv_defs.h
- index 15d29c3..84114d4 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_tlv_defs.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_tlv_defs.h
- @@ -557,21 +557,6 @@ typedef enum {
- WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param,
- WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param,
- WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param,
- - WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param,
- - WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param,
- - WMITLV_TAG_STRUC_wmi_fw_mem_dump_params,
- - WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param,
- - WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param,
- - WMITLV_TAG_STRUC_wmi_peer_set_rate_report_condition_fixed_param,
- - WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param,
- - WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param,
- - WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_fixed_param,
- - WMITLV_TAG_STRUC_wmi_rssi_breach_event_fixed_param,
- - WMITLV_TAG_STRUC_WOW_EVENT_INITIAL_WAKEUP_fixed_param,
- - WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param,
- - WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param,
- - WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param,
- - WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param,
- } WMITLV_TAG_ID;
- /*
- @@ -784,15 +769,7 @@ typedef enum {
- OP(WMI_DCC_UPDATE_NDL_CMDID) \
- OP(WMI_ROAM_FILTER_CMDID) \
- OP(WMI_PASSPOINT_LIST_CONFIG_CMDID) \
- - OP(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID) \
- - OP(WMI_GET_FW_MEM_DUMP_CMDID) \
- - OP(WMI_DEBUG_MESG_FLUSH_CMDID) \
- - OP(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID) \
- - OP(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID) \
- - OP(WMI_VDEV_SET_IE_CMDID) \
- - OP(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID) \
- - OP(WMI_SOC_SET_PCL_CMDID) \
- - OP(WMI_SOC_SET_HW_MODE_CMDID)
- + OP(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID)
- /*
- * IMPORTANT: Please add _ALL_ WMI Events Here.
- @@ -895,13 +872,7 @@ typedef enum {
- OP(WMI_DCC_UPDATE_NDL_RESP_EVENTID) \
- OP(WMI_DCC_STATS_EVENTID) \
- OP(WMI_PASSPOINT_MATCH_EVENTID) \
- - OP(WMI_VDEV_TSF_REPORT_EVENTID) \
- - OP(WMI_UPDATE_FW_MEM_DUMP_EVENTID) \
- - OP(WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID) \
- - OP(WMI_RSSI_BREACH_EVENTID)\
- - OP(WMI_WOW_INITIAL_WAKEUP_EVENTID) \
- - OP(WMI_SOC_SET_HW_MODE_RESP_EVENTID) \
- - OP(WMI_SOC_HW_MODE_TRANSITION_EVENTID)
- + OP(WMI_VDEV_TSF_REPORT_EVENTID)
- /* TLV definitions of WMI commands */
- @@ -1249,13 +1220,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
- WMITLV_CREATE_PARAM_STRUC(WMI_PEER_ASSOC_CMDID);
- -/* Peer Set Rate Report Condition Cmd */
- -#define WMITLV_TABLE_WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_set_rate_report_condition_fixed_param, wmi_peer_set_rate_report_condition_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -
- -WMITLV_CREATE_PARAM_STRUC(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
- -
- -
- /* Add Beacon filter Cmd */
- #define WMITLV_TABLE_WMI_ADD_BCN_FILTER_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param, wmi_add_bcn_filter_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- @@ -1348,22 +1312,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
- WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_STATS_CMDID);
- -
- -/* Request for memory dump stats Cmd */
- -#define WMITLV_TABLE_WMI_GET_FW_MEM_DUMP_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param, wmi_get_fw_mem_dump_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_fw_mem_dump, fw_mem_dump_params, WMITLV_SIZE_VAR)
- -
- -WMITLV_CREATE_PARAM_STRUC(WMI_GET_FW_MEM_DUMP_CMDID);
- -
- -/* flush debug messages */
- -#define WMITLV_TABLE_WMI_DEBUG_MESG_FLUSH_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param, wmi_debug_mesg_flush_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -
- -WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_MESG_FLUSH_CMDID);
- -
- -
- -
- /* Set config params */
- #define WMITLV_TABLE_WMI_START_LINK_STATS_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param, wmi_start_link_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- @@ -2083,16 +2031,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param, wmi_pdev_get_temperature_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_TEMPERATURE_CMDID);
- -/* Set antenna diversity Cmd */
- +/* Set antenna diversiry Cmd */
- #define WMITLV_TABLE_WMI_SET_ANTENNA_DIVERSITY_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param, wmi_pdev_set_antenna_diversity_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- WMITLV_CREATE_PARAM_STRUC(WMI_SET_ANTENNA_DIVERSITY_CMDID);
- -/* Set rssi monitoring config Cmd */
- -#define WMITLV_TABLE_WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID(id,op,buf,len) \
- -WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_fixed_param, wmi_rssi_breach_monitor_config_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -WMITLV_CREATE_PARAM_STRUC(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
- -
- /* DHCP server offload param Cmd */
- #define WMITLV_TABLE_WMI_SET_DHCP_SERVER_OFFLOAD_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param, wmi_set_dhcp_server_offload_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- @@ -2215,24 +2158,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_FILTER_CMDID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param, wmi_vdev_tsf_tstamp_action_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
- -/* LFR subnet change config Cmd */
- -#define WMITLV_TABLE_WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param, wmi_roam_subnet_change_config_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, skip_subnet_change_detection_bssid_list, WMITLV_SIZE_VAR)
- -
- -WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
- -
- -/* Set the SOC Preferred Channel List (PCL) Cmd */
- -#define WMITLV_TABLE_WMI_SOC_SET_PCL_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param, wmi_soc_set_pcl_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, channel_list, WMITLV_SIZE_VAR)
- -WMITLV_CREATE_PARAM_STRUC(WMI_SOC_SET_PCL_CMDID);
- -
- -/* Set the SOC Hardware Mode Cmd */
- -#define WMITLV_TABLE_WMI_SOC_SET_HW_MODE_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param, wmi_soc_set_hw_mode_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -WMITLV_CREATE_PARAM_STRUC(WMI_SOC_SET_HW_MODE_CMDID);
- -
- /************************** TLV definitions of WMI events *******************************/
- /* Service Ready event */
- @@ -2240,8 +2165,7 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SOC_SET_HW_MODE_CMDID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_service_ready_event_fixed_param, wmi_service_ready_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_HAL_REG_CAPABILITIES, HAL_REG_CAPABILITIES, hal_reg_capabilities, WMITLV_SIZE_FIX) \
- WMITLV_FXAR(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, wmi_service_bitmap, WMITLV_SIZE_FIX, WMI_SERVICE_BM_SIZE) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wlan_host_mem_req, mem_reqs, WMITLV_SIZE_VAR) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, wlan_dbs_hw_mode_list, WMITLV_SIZE_VAR)
- + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wlan_host_mem_req, mem_reqs, WMITLV_SIZE_VAR)
- WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EVENTID);
- /* Ready event */
- @@ -2405,8 +2329,7 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_EVENTID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bcn_probe_rsp_frame, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, reassoc_rsp_frame, WMITLV_SIZE_VAR) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_channel, wmi_channel, chan, WMITLV_SIZE_FIX) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_key_material, key, WMITLV_SIZE_VAR) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, status, WMITLV_SIZE_FIX)
- + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_key_material, key, WMITLV_SIZE_VAR)
- WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_EVENTID);
- /* WOW Wakeup Host Event */
- @@ -2420,10 +2343,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_EVENTID);
- WMITLV_CREATE_PARAM_STRUC(WMI_WOW_WAKEUP_HOST_EVENTID);
- -#define WMITLV_TABLE_WMI_WOW_INITIAL_WAKEUP_EVENTID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WOW_EVENT_INITIAL_WAKEUP_fixed_param, WOW_INITIAL_WAKEUP_EVENT_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -WMITLV_CREATE_PARAM_STRUC(WMI_WOW_INITIAL_WAKEUP_EVENTID);
- -
- /* RTT error report Event */
- #define WMITLV_TABLE_WMI_RTT_ERROR_REPORT_EVENTID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
- @@ -2465,14 +2384,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_RFKILL_STATE_CHANGE_EVENTID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR)
- WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_MESG_EVENTID);
- -#define WMITLV_TABLE_WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID(id,op,buf,len)\
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param, wmi_debug_mesg_flush_complete_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID);
- -
- -#define WMITLV_TABLE_WMI_RSSI_BREACH_EVENTID(id,op,buf,len)\
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rssi_breach_event_fixed_param, wmi_rssi_breach_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -WMITLV_CREATE_PARAM_STRUC(WMI_RSSI_BREACH_EVENTID);
- -
- /* Diagnostics Event */
- #define WMITLV_TABLE_WMI_DIAG_EVENTID(id,op,buf,len)\
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR)
- @@ -2546,14 +2457,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_STATS_EVENTID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, wmi_vdev_rate_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_rate_ht_info, ht_info, WMITLV_SIZE_VAR)
- WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_VDEV_RATE_STATS_EVENTID);
- -
- -
- -/* Update memory dump complete Event */
- -#define WMITLV_TABLE_WMI_UPDATE_FW_MEM_DUMP_EVENTID(id,op,buf,len)\
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param, wmi_update_fw_mem_dump_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- -
- -WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_FW_MEM_DUMP_EVENTID);
- -
- /* Update iface link stats Event */
- #define WMITLV_TABLE_WMI_IFACE_LINK_STATS_EVENTID(id,op,buf,len)\
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param, wmi_iface_link_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- @@ -2788,23 +2691,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DCC_STATS_EVENTID);
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param, wmi_vdev_tsf_report_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
- WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_TSF_REPORT_EVENTID);
- -/* Vdev capabilities IE to be transmitted in mgmt frames */
- -#define WMITLV_TABLE_WMI_VDEV_SET_IE_CMDID(id,op,buf,len) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param, wmi_vdev_set_ie_cmd_fixed_param, vdev_ie, WMITLV_SIZE_FIX) \
- - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR)
- -WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_IE_CMDID);
- -
- -/* SOC Set Hardware Mode Response event */
- -#define WMITLV_TABLE_WMI_SOC_SET_HW_MODE_RESP_EVENTID(id,op,buf,len) \
- -WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param, wmi_soc_set_hw_mode_response_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- -WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_soc_set_hw_mode_response_vdev_mac_entry, wmi_soc_set_hw_mode_response_vdev_mac_mapping, WMITLV_SIZE_VAR)
- -WMITLV_CREATE_PARAM_STRUC(WMI_SOC_SET_HW_MODE_RESP_EVENTID);
- -
- -/* SOC Hardware Mode Transition event */
- -#define WMITLV_TABLE_WMI_SOC_HW_MODE_TRANSITION_EVENTID(id,op,buf,len) \
- -WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param, wmi_soc_hw_mode_transition_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- -WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_soc_set_hw_mode_response_vdev_mac_entry, wmi_soc_set_hw_mode_response_vdev_mac_mapping, WMITLV_SIZE_VAR)
- -WMITLV_CREATE_PARAM_STRUC(WMI_SOC_HW_MODE_TRANSITION_EVENTID);
- #ifdef __cplusplus
- }
- #endif
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_unified.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_unified.h
- index 4819fa5..75e7a08 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_unified.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_unified.h
- @@ -121,7 +121,7 @@ extern "C" {
- (((num_entries) / (32 / (bits_per_entry))) + \
- (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
- -static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
- +static inline A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
- A_UINT32 entry_index, A_UINT32 bits_per_entry)
- {
- A_UINT32 entries_per_uint = (32 / bits_per_entry);
- @@ -133,7 +133,7 @@ static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
- (( 1 << bits_per_entry) - 1));
- }
- -static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
- +static inline void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
- A_UINT32 bits_per_entry, A_UINT32 val)
- {
- A_UINT32 entries_per_uint = (32 / bits_per_entry);
- @@ -228,7 +228,6 @@ typedef enum {
- WMI_GRP_MDNS_OFL,
- WMI_GRP_SAP_OFL,
- WMI_GRP_OCB,
- - WMI_GRP_SOC,
- } WMI_GRP_ID;
- #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
- @@ -332,9 +331,6 @@ typedef enum {
- WMI_VDEV_PLMREQ_STOP_CMDID,
- /* TSF timestamp action for specified vdev */
- WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
- - /** set the capabilties IE, e.g. for extended caps in probe requests,
- - * assoc req etc for frames FW locally generates */
- - WMI_VDEV_SET_IE_CMDID,
- /* peer specific commands */
- @@ -361,10 +357,6 @@ typedef enum {
- * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
- */
- WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
- - /** Set the conditions to report peer justified rate to driver
- - * The justified rate means the the user-rate is justified by PER.
- - */
- - WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
- /* beacon/management specific commands */
- @@ -442,8 +434,6 @@ typedef enum {
- WMI_ROAM_INVOKE_CMDID,
- /** roaming filter cmd to allow further filtering of roaming candidate */
- WMI_ROAM_FILTER_CMDID,
- - /** set gateway ip, mac and retries for subnet change detection */
- - WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
- /** offload scan specific commands */
- /** set offload scan AP profile */
- @@ -559,12 +549,6 @@ typedef enum {
- /** Request to clear stats*/
- WMI_CLEAR_LINK_STATS_CMDID,
- - /** Request for getting the Firmware Memory Dump */
- - WMI_GET_FW_MEM_DUMP_CMDID,
- -
- - /** Request to flush of the buffered debug messages */
- - WMI_DEBUG_MESG_FLUSH_CMDID,
- -
- /** ARP OFFLOAD REQUEST*/
- WMI_SET_ARP_NS_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
- @@ -654,8 +638,7 @@ typedef enum {
- WMI_SET_ANTENNA_DIVERSITY_CMDID,
- /** Set OCB Sched Request, deprecated */
- WMI_OCB_SET_SCHED_CMDID,
- - /** Set rssi monitoring config command */
- - WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
- +
- /* GPIO Configuration */
- WMI_GPIO_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
- WMI_GPIO_OUTPUT_CMDID,
- @@ -793,9 +776,6 @@ typedef enum {
- WMI_DCC_GET_STATS_CMDID,
- WMI_DCC_CLEAR_STATS_CMDID,
- WMI_DCC_UPDATE_NDL_CMDID,
- - /* System-On-Chip commands */
- - WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
- - WMI_SOC_SET_HW_MODE_CMDID,
- } WMI_CMD_ID;
- @@ -921,7 +901,6 @@ typedef enum {
- will cary wake reason */
- WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
- WMI_D0_WOW_DISABLE_ACK_EVENTID,
- - WMI_WOW_INITIAL_WAKEUP_EVENTID,
- /*RTT related event ID*/
- /** RTT measurement report */
- @@ -940,9 +919,6 @@ typedef enum {
- /** FW Update radio stats Event */
- WMI_RADIO_LINK_STATS_EVENTID,
- - /** Firmware memory dump Complete event*/
- - WMI_UPDATE_FW_MEM_DUMP_EVENTID,
- -
- /*NLO specific events*/
- /** NLO match event after the first match */
- WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
- @@ -1020,12 +996,6 @@ typedef enum {
- /** Set OCB Sched Response, deprecated */
- WMI_OCB_SET_SCHED_EVENTID,
- - /** event to indicate the flush of the buffered debug messages is complete*/
- - WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
- -
- - /** event to report mix/max RSSI breach events */
- - WMI_RSSI_BREACH_EVENTID,
- -
- /* GPIO Event */
- WMI_GPIO_INPUT_EVENTID=WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
- /** upload H_CV info WMI event
- @@ -1085,10 +1055,6 @@ typedef enum {
- WMI_DCC_GET_STATS_RESP_EVENTID,
- WMI_DCC_UPDATE_NDL_RESP_EVENTID,
- WMI_DCC_STATS_EVENTID,
- -
- - /* System-On-Chip events */
- - WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
- - WMI_SOC_HW_MODE_TRANSITION_EVENTID,
- } WMI_EVT_ID;
- /* defines for OEM message sub-types */
- @@ -1100,8 +1066,6 @@ typedef enum {
- #define WMI_OEM_NAN_MEAS_REQ 0x06
- #define WMI_OEM_NAN_MEAS_RSP 0x07
- #define WMI_OEM_NAN_PEER_INFO 0x08
- -#define WMI_OEM_CONFIGURE_LCR 0x09
- -#define WMI_OEM_CONFIGURE_LCI 0x0A
- /* below message subtype is internal to CLD. Target should
- @@ -1191,7 +1155,6 @@ WMI_CHANNEL_CHANGE_CAUSE_CSA,
- } while(0)
- #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff )
- -/* max tx power is in 1 dBm units */
- #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
- (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
- (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
- @@ -1281,62 +1244,6 @@ WMI_CHANNEL_CHANGE_CAUSE_CSA,
- #define WMI_SYS_CAP_ENABLE 0x00000001
- #define WMI_SYS_CAP_TXPOWER 0x00000002
- -/*
- - * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
- - * Bits 5:0 are reserved
- - */
- -#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
- -#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
- -#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
- -#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
- -#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
- -#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
- -#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
- -#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
- -
- -#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
- -#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
- -#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
- -
- -#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK))
- -#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
- - (hw_mode != ((value << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK))
- -#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK))
- -#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK))
- -#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK))
- -#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK))
- -#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_DBS_MODE_BITPOS) & WMI_DBS_HW_MODE_DBS_MODE_MASK))
- -#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
- - (hw_mode |= ((value << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK))
- -
- -#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
- -#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
- -#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
- -#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
- - ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
- -
- /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
- typedef struct _wmi_abi_version {
- A_UINT32 abi_version_0; /** WMI Major and Minor versions */
- @@ -1406,43 +1313,14 @@ typedef struct {
- */
- A_UINT32 max_supported_macs;
- - /*
- - * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
- - */
- - A_UINT32 wmi_fw_sub_feat_caps; //values from enum WMI_FW_SUB_FEAT_CAPS
- -
- - /*
- - * Number of Dual Band Simultaneous (DBS) hardware modes
- - */
- - A_UINT32 num_dbs_hw_modes;
- -
- /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
- * HAL_REG_CAPABILITIES hal_reg_capabilities;
- * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
- * wlan_host_mem_req mem_reqs[];
- - * wlan_dbs_hw_mode_list[];
- */
- } wmi_service_ready_event_fixed_param;
- typedef enum {
- - WMI_FW_STA_RTT_INITR = 0x00000001,
- - WMI_FW_STA_RTT_RESPR = 0x00000002,
- - WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
- - WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
- - WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
- - WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
- - WMI_FW_AP_RTT_INITR = 0x00000040,
- - WMI_FW_AP_RTT_RESPR = 0x00000080,
- - WMI_FW_NAN_RTT_INITR = 0x00000100,
- - WMI_FW_NAN_RTT_RESPR = 0x00000200,
- - /*
- - * New fw sub feature capabilites before
- - * WMI_FW_MAX_SUB_FEAT_CAP
- - */
- - WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
- -} WMI_FW_SUB_FEAT_CAPS;
- -
- -typedef enum {
- WMI_HWBD_NONE = 0, /* No hw board information is given */
- WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
- WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
- @@ -1809,12 +1687,13 @@ typedef struct {
- typedef struct {
- /** WMI_CHAN_LIST_TAG */
- A_UINT32 tag;
- - /** # of channels to scan */
- + /** # if channels to scan */
- A_UINT32 num_chan;
- /** channels in Mhz */
- A_UINT32 channel_list[1];
- } wmi_chan_list;
- +
- /**
- * TLV for bssid list
- */
- @@ -2190,15 +2069,6 @@ typedef struct {
- A_UINT32 flags;
- /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
- A_INT32 rssi;
- - /** delta between local TSF(TSF timestamp when frame was RXd)
- - * and remote TSF(TSF timestamp in the IE for mgmt frame -
- - * beacon,proberesp for e.g). If remote TSF is not available,
- - * delta set to 0.
- - * Although tsf_delta is stored as A_UINT32, it can be negative,
- - * and thus would need to be sign-extended if added to a value
- - * larger than 32 bits.
- - */
- - A_UINT32 tsf_delta;
- /* This TLV is followed by array of bytes:
- * // management frame buffer
- @@ -2679,28 +2549,6 @@ typedef enum {
- WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
- /** Set CTS channel BW for dynamic BW adjustment feature */
- WMI_PDEV_PARAM_CTS_CBW,
- - /** Set GPIO pin info used by WNTS */
- - WMI_PDEV_PARAM_WNTS_CONFIG,
- - /** Enable/Disable hardware adaptive early rx feature */
- - WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
- - /** The minimum early rx duration, to ensure early rx duration is non-zero */
- - WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
- - /** Increasing/decreasing step used by hardware */
- - WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
- - /** The fixed early rx duration when adaptive early rx is disabled */
- - WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
- - /** Enable/Disable bmiss based adaptive beacon timeout feature */
- - WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
- - /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
- - WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
- - /** Increasing/decreasing step used by hardware */
- - WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
- - /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
- - WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
- - /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
- - WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
- - /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
- - WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
- } WMI_PDEV_PARAM;
- typedef enum {
- @@ -2758,21 +2606,6 @@ typedef struct {
- A_UINT32 value; /** bit0 is for enable/disable FAST diversity, and bit1 is for enable/disable SLOW diversity, 0->disable, 1->enable */
- } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
- -#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
- -
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
- - A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
- - A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
- - A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
- - A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
- - A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
- - A_UINT32 lo_rssi_reenable_hysteresis; /* unit dBm. once low rssi[] breached, same event bitmap will be generated only after signal gets better than this level. This value is adopted for all low_rssi_breach_threshold[3] */
- - A_UINT32 hi_rssi_reenable_histeresis;/* unit dBm. once hi rssi[] breached, same event bitmap will be generated only after signal gets worse than this level. This value is adopted for all hi_rssi_breach_threshold[3] */
- - A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
- - A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
- -} wmi_rssi_breach_monitor_config_fixed_param;
- -
- typedef struct {
- /** parameter */
- A_UINT32 param;
- @@ -3095,66 +2928,6 @@ typedef struct {
- /** Default value for stats if the stats collection has not started */
- #define WMI_STATS_VALUE_INVALID 0xffffffff
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
- - A_UINT32 reserved0; /** placeholder for future */
- -} wmi_debug_mesg_flush_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
- - A_UINT32 reserved0; /** placeholder for future */
- -} wmi_debug_mesg_flush_complete_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
- - /* vdev_id, where RSSI breach event occurred */
- - A_UINT32 vdev_id;
- - /* request id */
- - A_UINT32 request_id;
- - /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
- - A_UINT32 event_bitmap;
- - /* rssi at the time of RSSI breach. Unit dBm */
- - A_UINT32 rssi;
- - /* bssid of the monitored AP's */
- - wmi_mac_addr bssid;
- -} wmi_rssi_breach_event_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
- - /** unique id identifying the segment */
- - A_UINT32 seg_id;
- - /** Start address of the segment to be read */
- - A_UINT32 seg_start_addr_lo;
- - A_UINT32 seg_start_addr_hi;
- - /** Length of the segment to be read */
- - A_UINT32 seg_length;
- - /** Host bufeer address to which the segment will be read and dumped */
- - A_UINT32 dest_addr_lo;
- - A_UINT32 dest_addr_hi;
- -} wmi_fw_mem_dump;
- -
- -/* Command to get firmware memory dump*/
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
- - /** unique id identifying the request */
- - A_UINT32 request_id;
- - /** number of memory dump segments */
- - A_UINT32 num_fw_mem_dump_segs;
- -/**
- - * This TLV is followed by another TLV
- - * wmi_fw_mem_dump fw_mem_dump[];
- - */
- -} wmi_get_fw_mem_dump_fixed_param;
- -
- -/** Event to indicate the completion of fw mem dump */
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
- - /** unique id identifying the request, given in the request stats command */
- - A_UINT32 request_id;
- - /*In case of Firmware memory dump */
- - A_UINT32 fw_mem_dump_complete;
- -} wmi_update_fw_mem_dump_fixed_param;
- -
- typedef enum {
- WMI_ROAMING_IDLE = 0,
- WMI_ROAMING_ACTIVE = 1,
- @@ -4061,10 +3834,6 @@ typedef enum {
- * beacon spread or average number of frames leaked */
- WMI_VDEV_PARAM_STATS_AVG_FACTOR,
- - /** disconnect threshold, once the consecutive error for specific peer
- - * exceed this threhold, FW will send kickout event to host */
- - WMI_VDEV_PARAM_DISCONNECT_TH,
- -
- } WMI_VDEV_PARAM;
- /* Length of ATIM Window in TU */
- @@ -4129,10 +3898,6 @@ typedef struct {
- A_UINT32 smps_mode;
- /** mac_id field contains the MAC identifier that the VDEV is bound to. The valid range is 0 to (num_macs-1). */
- A_UINT32 mac_id;
- - /** Configured Transmit Streams **/
- - A_UINT32 cfgd_tx_streams;
- - /** Configured Receive Streams **/
- - A_UINT32 cfgd_rx_streams;
- } wmi_vdev_start_response_event_fixed_param;
- typedef struct {
- @@ -4693,43 +4458,6 @@ typedef struct {
- /* Peer Specific commands and events */
- -typedef struct {
- - A_UINT32 percentage; /* in unit of 12.5% */
- - A_UINT32 min_delta; /* in unit of Mbps */
- -} rate_delta_t;
- -
- -#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
- -#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
- -#define MAX_NUM_OF_RATE_THRESH 4
- -
- -typedef struct {
- - A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
- - Any of these two conditions or both of them can be set. */
- - rate_delta_t rate_delta;
- - A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
- - If the threshold count is less than 4, set zero to
- - the one following the last threshold */
- -} report_cond_per_phy_t;
- -
- -
- -enum peer_rate_report_cond_phy_type {
- - PEER_RATE_REPORT_COND_11B = 0,
- - PEER_RATE_REPORT_COND_11A_G,
- - PEER_RATE_REPORT_COND_11N,
- - PEER_RATE_REPORT_COND_11AC,
- - PEER_RATE_REPORT_COND_MAX_NUM
- -};
- -
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
- - A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
- - A_UINT32 report_backoff_time; /* in unit of msecond */
- - A_UINT32 report_timer_period; /* in unit of msecond */
- - /* In the following field, the array index means the phy type,
- - * please see enum peer_rate_report_cond_phy_type for detail */
- - report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
- -} wmi_peer_set_rate_report_condition_fixed_param;
- -
- /* Peer Type:
- * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
- * on address and vdev opmode. This is largely here to allow host to indicate that
- @@ -4885,8 +4613,6 @@ typedef struct {
- A_UINT32 dtim_pwrsave_method;
- /** DTIM PS value. Contents depends on the method */
- A_UINT32 value;
- - /** Modulated DTIM value */
- - A_UINT32 MaxLIModulatedDTIM;
- } wmi_sta_dtim_ps_method_cmd_fixed_param;
- /*
- @@ -5053,7 +4779,6 @@ typedef struct {
- #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
- /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
- #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
- -#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
- #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
- /**
- @@ -5773,13 +5498,6 @@ typedef struct {
- */
- } wmi_roam_invoke_cmd_fixed_param;
- -/* Definition for op_bitmap */
- -enum {
- - ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
- - ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
- - ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
- -};
- -
- typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
- A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
- @@ -5798,75 +5516,6 @@ typedef struct {
- */
- } wmi_roam_filter_fixed_param;
- -typedef struct {
- - A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
- -} WMI_IPV4_ADDR;
- -
- -typedef struct _WMI_IPV6_ADDR {
- - A_UINT8 address[16]; /* IPV6 in Network Byte Order */
- -} WMI_IPV6_ADDR;
- -
- -/* flags for subnet change detection */
- -#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
- -#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
- -/* bit 2 to bit 31 are reserved */
- -
- -/* set IPv4 enabled/disabled flag and get the flag */
- -#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
- - (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
- -} while (0)
- -
- -#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
- - (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
- -} while (0)
- -
- -#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
- - ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED)
- -
- -/* set IPv6 enabled flag, disabled and get the flag */
- -#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
- - (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
- -} while (0)
- -
- -#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
- - (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
- -} while (0)
- -
- -#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
- - ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
- -} while (0)
- -
- -/**
- - * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
- - * to FW. FW uses these parameters for subnet change detection.
- - */
- -typedef struct {
- - A_UINT32 tlv_header; /** TLV tag and len; tag equals
- -WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
- - /** unique id identifying the VDEV, generated by the caller */
- - A_UINT32 vdev_id;
- - /** IPv4/IPv6 enabled/disabled */
- - /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
- -DISABLED */
- - A_UINT32 flag;
- - /** Gateway MAC address */
- - wmi_mac_addr inet_gw_mac_addr;
- - /** IP addresses */
- - WMI_IPV4_ADDR inet_gw_ip_v4_addr;
- - WMI_IPV6_ADDR inet_gw_ip_v6_addr;
- - /** Number of software retries for ARP/Neighbor solicitation request */
- - A_UINT32 max_retries;
- - /** timeout in milliseconds for each ARP request*/
- - A_UINT32 timeout;
- - /** number of skipped aps **/
- - A_UINT32 num_skip_subnet_change_detection_bssid_list;
- -/**
- - * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
- - * structure. The TLV's are:
- - * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
- - **/
- -} wmi_roam_subnet_change_config_fixed_param;
- -
- /** WMI_PROFILE_MATCH_EVENT: offload scan
- * generated when ever atleast one of the matching profiles is found
- * in recent NLO scan. no data is carried with the event.
- @@ -6145,7 +5794,6 @@ typedef enum event_type_e {
- WOW_BEACON_EVENT,
- WOW_CLIENT_KICKOUT_EVENT,
- WOW_NAN_EVENT,
- - WOW_EXTSCAN_EVENT,
- } WOW_WAKE_EVENT_TYPE;
- typedef enum wake_reason_e {
- @@ -6179,20 +5827,12 @@ typedef enum wake_reason_e {
- WOW_REASON_BEACON_RECV,
- WOW_REASON_CLIENT_KICKOUT_EVENT,
- WOW_REASON_NAN_EVENT,
- - WOW_REASON_EXTSCAN,
- - WOW_REASON_RSSI_BREACH_EVENT,
- WOW_REASON_DEBUG_TEST = 0xFF,
- } WOW_WAKE_REASON_TYPE;
- -typedef enum {
- - WOW_IFACE_PAUSE_ENABLED,
- - WOW_IFACE_PAUSE_DISABLED
- -} WOW_IFACE_STATUS;
- -
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
- A_UINT32 enable;
- - A_UINT32 pause_iface_config;
- } wmi_wow_enable_cmd_fixed_param;
- typedef struct {
- @@ -6331,11 +5971,6 @@ typedef struct wow_event_info_s {
- A_UINT32 data_len;
- }WOW_EVENT_INFO_fixed_param;
- -typedef struct wow_initial_wakeup_event_s {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
- - A_UINT32 vdev_id;
- -} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
- -
- typedef enum {
- WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
- WOW_EVENT_INFO_TYPE_BITMAP,
- @@ -6483,6 +6118,11 @@ typedef struct {
- #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
- #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
- +typedef struct _WMI_IPV6_ADDR {
- + A_UINT8 address[16]; /* IPV6 in Network Byte Order */
- +} WMI_IPV6_ADDR;
- +
- +
- typedef struct {
- A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
- A_UINT32 flags; /* flags */
- @@ -7044,11 +6684,14 @@ typedef struct {
- A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
- }WMI_GTK_OFFLOAD_CMD_fixed_param;
- +typedef struct {
- + A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
- +} WMI_IPV4_ADDR;
- +
- typedef enum {
- WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
- WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
- WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
- - WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
- } WMI_STA_KEEPALIVE_METHOD;
- typedef struct {
- @@ -7183,7 +6826,6 @@ typedef enum {
- RECOVERY_SIM_STACK_OV = 0x05,
- RECOVERY_SIM_INFINITE_LOOP = 0x06,
- RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
- - RECOVERY_SIM_SELF_RECOVERY = 0x08,
- } RECOVERY_SIM_TYPE;
- /* WMI_FORCE_FW_HANG_CMDID */
- @@ -7984,34 +7626,25 @@ typedef struct
- A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
- } wmi_batch_scan_result_scan_list;
- -#define LPI_IE_BITMAP_BSSID 0x00000001 // if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP.
- -#define LPI_IE_BITMAP_IS_PROBE 0x00000002 // send true or false based on scan response frame being a Probe Rsp or not
- -#define LPI_IE_BITMAP_SSID 0x00000004 // send ssid from received scan response frame
- -#define LPI_IE_BITMAP_RSSI 0x00000008 // send RSSI value reported by HW for the received scan response after adjusting with noise floor
- -#define LPI_IE_BITMAP_CHAN 0x00000010 // send channel number from the received scan response
- -#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 // send Tx power from TPC IE of scan rsp
- -#define LPI_IE_BITMAP_TX_RATE 0x00000040 // send rate of the received frame as reported by HW.
- -#define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 // send true or false based on the received scan rsp was from a 11mc supported AP or not.
- -#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 // send timestamp reported in the received scan rsp frame.
- -#define LPI_IE_BITMAP_AGE_OF_MEASUREMENT 0x00000200 // (current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP.
- -/*
- - * TEMPORARY alias of incorrect old name the correct name.
- - * This alias will be removed once all references to the old name have been fixed.
- - */
- -#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
- -#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 // If an infra STA is active and connected to an AP, true value is sent else false.
- -#define LPI_IE_BITMAP_MSAP_IE 0x00000800 // info on the vendor specific proprietary IE MSAP
- -#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 // we indicate true or false based on if the AP has WPA or RSN security enabled
- -#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 // info about the beacons coming from an AP or P2P or NAN device.
- -#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 // info on whether the scan rsp was received from a passive channel
- -#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 // send the scan dwell time of the channel on which the current scan rsp frame was received.
- -#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 // the center frequencies in case AP is supporting wider channels than 20 MHz
- -#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 // same as above
- -#define LPI_IE_BITMAP_PHY_MODE 0x00040000 // PHY mode indicates a, b, ,g, ac and other combinations
- -#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 // scan module id indicates the scan client who originated the scan
- -#define LPI_IE_BITMAP_SCAN_ID 0x00100000 // extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed.
- -#define LPI_IE_BITMAP_FLAGS 0x00200000 // reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not
- -#define LPI_IE_BITMAP_CACHING_REQD 0x00400000 // extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not
- +#define LPI_IE_BITMAP_BSSID 0x00000001
- +#define LPI_IE_BITMAP_IS_PROBE 0x00000002
- +#define LPI_IE_BITMAP_SSID 0x00000004
- +#define LPI_IE_BITMAP_RSSI 0x00000008
- +#define LPI_IE_BITMAP_CHAN 0x00000010
- +#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020
- +#define LPI_IE_BITMAP_TX_RATE 0x00000040
- +#define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080
- +#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100
- +#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT 0x00000200
- +#define LPI_IE_BITMAP_CONN_STATUS 0x00000400
- +#define LPI_IE_BITMAP_MSAP_IE 0x00000800
- +#define LPI_IE_BITMAP_SEC_STATUS 0x00001000
- +#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000
- +#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000
- +#define LPI_IE_BITMAP_DWELL_TIME 0x00008000
- +#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000
- +#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000
- +#define LPI_IE_BITMAP_PHY_MODE 0x00040000
- #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
- typedef struct {
- @@ -8236,9 +7869,6 @@ typedef struct {
- A_UINT32 led_enable;
- } wmi_pdev_set_led_config_cmd_fixed_param;
- -#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
- -#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
- -
- /** WMI_PEER_INFO_REQ_CMDID
- * Request FW to provide peer info */
- typedef struct {
- @@ -8805,7 +8435,6 @@ typedef struct {
- * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
- * wmi_channel chan;
- * wmi_key_material key;
- - * A_UINT32 status; subnet changed status
- **/
- } wmi_roam_synch_event_fixed_param;
- @@ -8998,15 +8627,10 @@ typedef enum {
- } wmi_extscan_forwarding_flags;
- typedef enum {
- - WMI_EXTSCAN_USE_MSD = 0x0001, // Use Motion Sensor Detection */
- - WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, // Extscan LPASS extended batching feature is supported and enabled
- + WMI_EXTSCAN_USE_MSD = 0x0001, // Use Motion Sensor Detection */
- } wmi_extscan_configuration_flags;
- typedef enum {
- - WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, // Cache the results of bucket whose configuration flags has this bit set
- -} wmi_extscan_bucket_configuration_flags;
- -
- -typedef enum {
- WMI_EXTSCAN_STATUS_OK = 0,
- WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
- WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
- @@ -9043,7 +8667,7 @@ typedef struct {
- A_UINT32 notify_extscan_events;
- /** Options to forward scan results - see wmi_extscan_forwarding_flags */
- A_UINT32 forwarding_flags;
- - /** ExtScan configuration flags - wmi_extscan__bucket_configuration_flags */
- + /** ExtScan configuration flags - wmi_extscan_configuration_flags */
- A_UINT32 configuration_flags;
- /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
- A_UINT32 base_period_multiplier;
- @@ -9598,9 +9222,8 @@ typedef struct {
- enum _tExtScanEntryFlags
- {
- - WMI_HOTLIST_FLAG_NONE = 0x00,
- - WMI_HOTLIST_FLAG_PRESENCE = 0x01,
- - WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
- + WMI_HOTLIST_FLAG_NONE = 0x00,
- + WMI_HOTLIST_FLAG_PRESENCE = 0x01
- };
- typedef struct {
- @@ -9852,7 +9475,6 @@ typedef struct{
- A_UINT32 pattern_id; /* pattern identifier */
- A_UINT32 led_x0; /* led flashing parameter0 */
- A_UINT32 led_x1; /* led flashing parameter1 */
- - A_UINT32 gpio_num; /* GPIO number */
- } wmi_set_led_flashing_cmd_fixed_param;
- /**
- @@ -9975,11 +9597,6 @@ typedef struct {
- */
- } wmi_sap_ofl_add_sta_event_fixed_param;
- -typedef enum {
- - SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
- - SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
- -} wmi_sap_ofl_del_sta_flags;
- -
- typedef struct {
- A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
- /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
- @@ -9990,8 +9607,6 @@ typedef struct {
- wmi_mac_addr peer_macaddr;
- /** disassociation reason */
- A_UINT32 reason;
- - /** flags - wmi_sap_ofl_del_sta_flags */
- - A_UINT32 flags;
- } wmi_sap_ofl_del_sta_event_fixed_param;
- typedef struct {
- @@ -10827,131 +10442,9 @@ typedef struct {
- A_UINT32 status;
- } wmi_dcc_update_ndl_resp_event_fixed_param;
- -/* Actions for TSF timestamp */
- -typedef enum {
- - TSF_TSTAMP_CAPTURE_REQ = 1,
- - TSF_TSTAMP_CAPTURE_RESET = 2,
- - TSF_TSTAMP_READ_VALUE = 3,
- -} wmi_tsf_tstamp_action;
- -
- -typedef struct {
- - /** TLV tag and len; tag equals
- - * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
- - A_UINT32 tlv_header;
- - /** unique id identifying the VDEV, generated by the caller */
- - A_UINT32 vdev_id;
- - /* action type, refer to wmi_tsf_tstamp_action */
- - A_UINT32 tsf_action;
- -} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
- -
- -typedef struct {
- - /* TLV tag and len; tag equals
- - * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
- - A_UINT32 tlv_header;
- - /* VDEV identifier */
- - A_UINT32 vdev_id;
- - /* low 32bit of tsf */
- - A_UINT32 tsf_low;
- - /* high 32 bit of tsf */
- - A_UINT32 tsf_high;
- -} wmi_vdev_tsf_report_event_fixed_param;
- -
- -typedef struct {
- - /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
- - A_UINT32 tlv_header;
- - /** unique id identifying the VDEV, generated by the caller */
- - A_UINT32 vdev_id;
- - /** unique id to identify the ie_data as defined by ieee 802.11 spec */
- - A_UINT32 ie_id; /** ie_len corresponds to num of bytes in ie_data[] */
- - A_UINT32 ie_len;
- - /**
- - * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
- - * A_UINT8 ie_data[]; */
- -} wmi_vdev_set_ie_cmd_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
- - /** Set Preferred Channel List **/
- -
- - /** # of channels to scan */
- - A_UINT32 num_chan;
- /**
- - * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
- - * structure. The TLV's are:
- - * A_UINT32 channel_list[];
- - **/
- -} wmi_soc_set_pcl_cmd_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
- - /** Set Hardware Mode **/
- -
- - /* Hardware Mode Index */
- - A_UINT32 hw_mode_index;
- -} wmi_soc_set_hw_mode_cmd_fixed_param;
- -
- -/** Data structure for information specific to a VDEV to MAC mapping. */
- -typedef struct {
- - /** TLV tag and len; tag equals
- - * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
- - A_UINT32 tlv_header;
- - A_UINT32 vdev_id; /* VDEV ID */
- - A_UINT32 mac_id; /* MAC ID */
- -} wmi_soc_set_hw_mode_response_vdev_mac_entry;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
- - /** Set Hardware Mode Response Event **/
- -
- - /* Status of set_hw_mode command */
- - /*
- - * Values for Status:
- - * 0 - OK; command successful
- - * 1 - EINVAL; Requested invalid hw_mode
- - * 2 - ECANCELED; HW mode change canceled
- - * 3 - ENOTSUP; HW mode not supported
- - * 4 - EHARDWARE; HW mode change prevented by hardware
- - * 5 - EPENDING; HW mode change is pending
- - * 6 - ECOEX; HW mode change conflict with Coex
- - */
- - A_UINT32 status;
- - /* Configured Hardware Mode */
- - A_UINT32 cfgd_hw_mode_index;
- - /* Number of Vdev to Mac entries */
- - A_UINT32 num_vdev_mac_entries;
- -
- -/**
- - * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
- - * structure. The TLV's are:
- - * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
- - */
- -} wmi_soc_set_hw_mode_response_event_fixed_param;
- -
- -typedef struct {
- - A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
- - /** Hardware Mode Transition Event **/
- -
- - /* Original or old Hardware mode */
- - A_UINT32 old_hw_mode_index;
- - /* New Hardware Mode */
- - A_UINT32 new_hw_mode_index;
- - /* Number of Vdev to Mac entries */
- - A_UINT32 num_vdev_mac_entries;
- -
- -/**
- - * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
- - * structure. The TLV's are:
- - * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
- - */
- -} wmi_soc_hw_mode_transition_event_fixed_param;
- -
- -
- -/* ADD NEW DEFS HERE */
- -
- -/*****************************************************************************
- * The following structures are deprecated. DO NOT USE THEM!
- */
- -
- /** Max number of channels in the schedule. */
- #define OCB_CHANNEL_MAX (5)
- @@ -11006,12 +10499,40 @@ typedef struct {
- /** Return status. 0 for success, non-zero otherwise */
- A_UINT32 status;
- } wmi_ocb_set_sched_event_fixed_param;
- -
- -/*****************************************************************************
- +/**
- * END DEPRECATED
- */
- -/* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
- +
- +/* Actions for TSF timestamp */
- +typedef enum {
- + TSF_TSTAMP_CAPTURE_REQ = 1,
- + TSF_TSTAMP_CAPTURE_RESET = 2,
- + TSF_TSTAMP_READ_VALUE = 3,
- +} wmi_tsf_tstamp_action;
- +
- +typedef struct {
- + /** TLV tag and len; tag equals
- + * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
- + A_UINT32 tlv_header;
- + /** unique id identifying the VDEV, generated by the caller */
- + A_UINT32 vdev_id;
- + /* action type, refer to wmi_tsf_tstamp_action */
- + A_UINT32 tsf_action;
- +} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
- +
- +typedef struct {
- + /* TLV tag and len; tag equals
- + * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
- + A_UINT32 tlv_header;
- + /* VDEV identifier */
- + A_UINT32 vdev_id;
- + /* low 32bit of tsf */
- + A_UINT32 tsf_low;
- + /* high 32 bit of tsf */
- + A_UINT32 tsf_high;
- +} wmi_vdev_tsf_report_event_fixed_param;
- +
- #ifdef __cplusplus
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_version.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_version.h
- index c1ab37f..5cc753b 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_version.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/COMMON/wmi_version.h
- @@ -36,7 +36,7 @@
- #define __WMI_VER_MINOR_ 0
- /** WMI revision number has to be incremented when there is a
- * change that may or may not break compatibility. */
- -#define __WMI_REVISION_ 127
- +#define __WMI_REVISION_ 103
- /** The Version Namespace should not be normally changed. Only
- * host and firmware of the same WMI namespace will work
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/inc/dfs.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/inc/dfs.h
- index 6907add..64c091d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/inc/dfs.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/inc/dfs.h
- @@ -275,7 +275,6 @@ 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
- @@ -601,11 +600,6 @@ struct ath_dfs {
- int dfs_pri_multiplier; /* allow pulse if they are within multiple of PRI for the radar type */
- int ath_dfs_nol_timeout;
- int dfs_pri_multiplier_ini; /* dfs pri configuration from ini */
- - /*
- - * Flag to indicate if DFS test mode is enabled and
- - * channel switch is disabled.
- - */
- - int8_t disable_dfs_ch_switch;
- };
- /* This should match the table from if_ath.c */
- @@ -693,7 +687,6 @@ 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/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs.c
- index bf81edf..fa05f5b 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs.c
- @@ -266,11 +266,10 @@ dfs_attach(struct ieee80211com *ic)
- ic->ic_dfs_attach(ic, &dfs->dfs_caps, &radar_info);
- dfs_clear_stats(ic);
- dfs->dfs_event_log_on = 0;
- - OS_INIT_TIMER(NULL, &(dfs->ath_dfs_task_timer), dfs_task, (void *) (ic),
- - ADF_DEFERRABLE_TIMER);
- + OS_INIT_TIMER(NULL, &(dfs->ath_dfs_task_timer), dfs_task, (void *) (ic));
- #ifndef ATH_DFS_RADAR_DETECTION_ONLY
- OS_INIT_TIMER(NULL, &(dfs->ath_dfstesttimer), dfs_testtimer_task,
- - (void *) ic, ADF_DEFERRABLE_TIMER);
- + (void *) ic);
- dfs->ath_dfs_cac_time = ATH_DFS_WAIT_MS;
- dfs->ath_dfstesttime = ATH_DFS_TEST_RETURN_PERIOD_MS;
- #endif
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_nol.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_nol.c
- index d907cec..3198a28 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_nol.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_nol.c
- @@ -239,7 +239,7 @@ dfs_nol_addchan(struct ath_dfs *dfs, struct ieee80211_channel *chan,
- dfs_nol_arg->delchwidth = elem->nol_chwidth;
- OS_INIT_TIMER(NULL, &elem->nol_timer, dfs_remove_from_nol,
- - dfs_nol_arg, ADF_DEFERRABLE_TIMER);
- + dfs_nol_arg);
- OS_SET_TIMER(&elem->nol_timer, dfs_nol_timeout*TIME_IN_MS);
- /* Update the NOL counter */
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
- index 2723852..b14106b 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c
- @@ -659,7 +659,6 @@ 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/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_phyerr.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
- index 8656502..b47e39d 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_phyerr.c
- @@ -755,7 +755,6 @@ 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.
- @@ -832,7 +831,6 @@ 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/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_radarevent.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
- index 1bb758d..1154ee8 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/DFS/src/dfs_process_radarevent.c
- @@ -380,32 +380,8 @@ dfs_process_radarevent(struct ath_dfs *dfs, struct ieee80211_channel *chan)
- dfs_reset_alldelaylines(dfs);
- dfs_reset_radarq(dfs);
- }
- -
- found = 0;
- - /*
- - * Use this fix only when device is not in test mode, as
- - * it drops some valid phyerrors.
- - * 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->disable_dfs_ch_switch == VOS_FALSE) &&
- - (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)) {
- @@ -540,11 +516,7 @@ 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);
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/copy_engine.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/copy_engine.c
- index c73a853..abb53b6 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/copy_engine.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/copy_engine.c
- @@ -1563,7 +1563,7 @@ CE_init(struct hif_pci_softc *sc,
- /* poll timer */
- if ((CE_state->attr_flags & CE_ATTR_ENABLE_POLL)) {
- adf_os_timer_init(scn->adf_dev, &CE_state->poll_timer,
- - CE_poll_timeout, CE_state, ADF_DEFERRABLE_TIMER);
- + CE_poll_timeout, CE_state);
- CE_state->timer_inited = true;
- adf_os_timer_mod(&CE_state->poll_timer, CE_POLL_TIMEOUT);
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/hif_pci.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/hif_pci.c
- index ef4e0f5..6b33c6f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/hif_pci.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/hif_pci.c
- @@ -2380,8 +2380,7 @@ HIF_PCIDeviceProbed(hif_handle_t hif_hdl)
- hif_state->fake_sleep = FALSE;
- hif_state->sleep_ticks = 0;
- adf_os_timer_init(NULL, &hif_state->sleep_timer,
- - HIF_sleep_entry, (void *)hif_state,
- - ADF_NON_DEFERRABLE_TIMER);
- + HIF_sleep_entry, (void *)hif_state);
- hif_state->fw_indicator_address = FW_INDICATOR_ADDRESS;
- hif_state->targid = A_TARGET_ID(sc->hif_device);
- @@ -2636,6 +2635,16 @@ HIFGetTargetId(HIF_DEVICE *hif_device)
- return(TARGID(sc));
- }
- +/* worker thread to recover when target does not respond over PCIe */
- +static void recovery_work_handler(struct work_struct *recovery)
- +{
- +#ifdef CONFIG_CNSS
- + cnss_device_self_recovery();
- +#endif
- +}
- +
- +static DECLARE_WORK(recovery_work, recovery_work_handler);
- +
- extern void HIFdebug(void);
- /*
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/if_pci.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/if_pci.c
- index d29462f..e76730f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/if_pci.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/HIF/PCIe/if_pci.c
- @@ -1765,11 +1765,6 @@ void hif_pci_crash_shutdown(struct pci_dev *pdev)
- return;
- }
- - if (vos_is_load_unload_in_progress(VOS_MODULE_ID_HIF, NULL)) {
- - pr_info("%s: Load/unload is in progress, ignore!\n", __func__);
- - return;
- - }
- -
- adf_os_spin_lock_irqsave(&hif_state->suspend_lock);
- #ifdef DEBUG
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/HTC/htc_services.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/HTC/htc_services.c
- index 948ef5c..72e9fcc 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/HTC/htc_services.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/HTC/htc_services.c
- @@ -279,7 +279,7 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle,
- target->osdev,
- &pEndpoint->ul_poll_timer,
- HTCSendCompleteCheckCleanup,
- - pEndpoint, ADF_DEFERRABLE_TIMER);
- + pEndpoint);
- }
- AR_DEBUG_PRINTF(ATH_DEBUG_SETUP, ("HTC Service:0x%4.4X, ULpipe:%d DLpipe:%d id:%d Ready\n",
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.c
- index d91b953..9556f8f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.c
- @@ -1370,8 +1370,6 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
- return -EINVAL;
- }
- - del_sta_ctx->is_tdls = true;
- - del_sta_ctx->vdev_id = vdev_id;
- del_sta_ctx->staId = peer_id;
- vos_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
- vos_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid,
- @@ -1433,7 +1431,6 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
- break;
- case WMI_PEER_STA_KICKOUT_REASON_INACTIVITY:
- - /* This could be for STA or SAP role */
- default:
- break;
- }
- @@ -1447,8 +1444,6 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
- return -EINVAL;
- }
- - del_sta_ctx->is_tdls = false;
- - del_sta_ctx->vdev_id = vdev_id;
- del_sta_ctx->staId = peer_id;
- vos_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
- vos_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr,
- @@ -5332,12 +5327,6 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
- goto err_event_init;
- }
- - vos_status = vos_event_init(&wma_handle->recovery_event);
- - if (vos_status != VOS_STATUS_SUCCESS) {
- - WMA_LOGP("%s: recovery event initialization failed", __func__);
- - goto err_event_init;
- - }
- -
- INIT_LIST_HEAD(&wma_handle->vdev_resp_queue);
- adf_os_spinlock_init(&wma_handle->vdev_respq_lock);
- adf_os_spinlock_init(&wma_handle->vdev_detach_lock);
- @@ -6359,7 +6348,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
- (struct sAniSirGlobal*)vos_get_context(VOS_MODULE_ID_PE,
- wma_handle->vos_context);
- tANI_U32 cfg_val;
- - tANI_U16 val16;
- + tANI_U16 val16;
- int ret;
- tSirMacHTCapabilityInfo *phtCapInfo;
- @@ -6474,12 +6463,6 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
- self_sta_req->sessionId);
- }
- }
- - ret = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle,
- - self_sta_req->sessionId,
- - WMI_VDEV_PARAM_DISCONNECT_TH,
- - self_sta_req->pkt_err_disconn_th);
- - if (ret)
- - WMA_LOGE("Failed to set WMI_VDEV_PARAM_DISCONNECT_TH");
- if (wlan_cfgGetInt(mac, WNI_CFG_RTS_THRESHOLD,
- &cfg_val) == eSIR_SUCCESS) {
- @@ -9415,12 +9398,6 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
- WLAN_PHY_MODE chanmode;
- u_int8_t *buf_ptr;
- struct wma_txrx_node *intr = wma->interfaces;
- - tpAniSirGlobal pmac = NULL;
- - struct ath_dfs *dfs;
- -
- - pmac = (tpAniSirGlobal)
- - vos_get_context(VOS_MODULE_ID_PE, wma->vos_context);
- - dfs = (struct ath_dfs *)wma->dfs_ic->ic_dfs;
- WMA_LOGD("%s: Enter isRestart=%d vdev=%d", __func__, isRestart,req->vdev_id);
- len = sizeof(*cmd) + sizeof(wmi_channel) +
- @@ -9540,8 +9517,6 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
- wma_dfs_configure_channel(wma->dfs_ic,chan,chanmode,req);
- wma_unified_dfs_phyerr_filter_offload_enable(wma);
- - dfs->disable_dfs_ch_switch =
- - pmac->sap.SapDfsInfo.disable_dfs_ch_switch;
- }
- }
- @@ -11056,24 +11031,6 @@ static int wmi_crash_inject(wmi_unified_t wmi_handle, u_int32_t type,
- return ret;
- }
- -/**
- - * wma_crash_inject() - sends command to FW to simulate crash
- - * @wma_handle: pointer of WMA context
- - * @type: subtype of the command
- - * @delay_time_ms: time in milliseconds for FW to delay the crash
- - *
- - * This function will send a command to FW in order to simulate different
- - * kinds of FW crashes.
- - *
- - * Return: 0 for success or reasons for failure
- - */
- -
- -int wma_crash_inject(tp_wma_handle wma_handle, uint32_t type,
- - uint32_t delay_time_ms)
- -{
- - return wmi_crash_inject(wma_handle->wmi_handle, type, delay_time_ms);
- -}
- -
- static int32_t wmi_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
- u_int32_t vdev_id, u_int32_t param, u_int32_t value)
- {
- @@ -16142,10 +16099,18 @@ static VOS_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
- /* Copy scan interval */
- if (pno->scanTimers.ucScanTimersCount) {
- + //BEGIN MOT a19110 IKDREL3KK-2175 PNO Enhancement
- cmd->fast_scan_period =
- - WMA_SEC_TO_MSEC(pno->scanTimers.aTimerValues[0].uTimerValue);
- - cmd->slow_scan_period = cmd->fast_scan_period;
- - WMA_LOGD("Scan period : %d msec", cmd->slow_scan_period);
- + WMA_SEC_TO_MSEC(pno->scanTimers.aTimerValues[0].uTimerValue);
- + WMA_LOGD("Fast Scan period : %d msec", cmd->fast_scan_period);
- +
- + cmd->fast_scan_max_cycles = pno->scanTimers.aTimerValues[0].uTimerRepeat;
- + WMA_LOGD("Fast Scan cycle : %d", cmd->fast_scan_max_cycles);
- +
- + cmd->slow_scan_period =
- + WMA_SEC_TO_MSEC(pno->scanTimers.aTimerValues[1].uTimerValue);
- + WMA_LOGD("Slow Scan period : %d msec", cmd->slow_scan_period);
- + //END IKDREL3KK-2175
- }
- buf_ptr += sizeof(wmi_nlo_config_cmd_fixed_param);
- @@ -17270,7 +17235,8 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
- wmi_get_pending_cmds(wma->wmi_handle));
- #ifdef CONFIG_CNSS
- if (pMac->sme.enableSelfRecovery) {
- - vos_trigger_recovery();
- + vos_set_logp_in_progress(VOS_MODULE_ID_HIF, TRUE);
- + cnss_schedule_recovery_work();
- } else {
- VOS_BUG(0);
- }
- @@ -18255,7 +18221,9 @@ static VOS_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
- if (!vos_is_logp_in_progress(VOS_MODULE_ID_HIF, NULL)) {
- #ifdef CONFIG_CNSS
- if (pMac->sme.enableSelfRecovery) {
- - vos_trigger_recovery();
- + vos_set_logp_in_progress(VOS_MODULE_ID_HIF,
- + TRUE);
- + cnss_schedule_recovery_work();
- } else {
- VOS_BUG(0);
- }
- @@ -18376,6 +18344,8 @@ int wma_disable_wow_in_fw(WMA_HANDLE handle)
- /* Unpause the vdev as we are resuming */
- wma_unpause_vdev(wma);
- + vos_wake_lock_timeout_acquire(&wma->wow_wake_lock, 2000);
- +
- return ret;
- }
- @@ -24258,7 +24228,6 @@ VOS_STATUS wma_close(v_VOID_t *vos_ctx)
- vos_event_destroy(&wma_handle->target_suspend);
- vos_event_destroy(&wma_handle->wma_resume_event);
- vos_event_destroy(&wma_handle->wow_tx_complete);
- - vos_event_destroy(&wma_handle->recovery_event);
- wma_cleanup_vdev_resp(wma_handle);
- for(idx = 0; idx < wma_handle->num_mem_chunks; ++idx) {
- adf_os_mem_free_consistent(
- @@ -25339,9 +25308,7 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
- adf_nbuf_unmap_single(pdev->osdev, skb, ADF_OS_DMA_TO_DEVICE);
- /* Call Download Cb so that umac can free the buffer */
- if (tx_frm_download_comp_cb)
- - tx_frm_download_comp_cb(wma_handle->mac_context,
- - tx_frame,
- - WMA_TX_FRAME_BUFFER_FREE);
- + tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 1);
- wma_handle->umac_data_ota_ack_cb = NULL;
- wma_handle->last_umac_data_nbuf = NULL;
- return VOS_STATUS_E_FAILURE;
- @@ -25349,9 +25316,7 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
- /* Call Download Callback if passed */
- if (tx_frm_download_comp_cb)
- - tx_frm_download_comp_cb(wma_handle->mac_context,
- - tx_frame,
- - WMA_TX_FRAME_BUFFER_NO_FREE);
- + tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 0);
- return VOS_STATUS_SUCCESS;
- }
- @@ -25441,13 +25406,9 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
- /*
- * Failed to send Tx Mgmt Frame
- + * Return Failure so that umac can freeup the buf
- */
- if (status) {
- - /* Call Download Cb so that umac can free the buffer */
- - if (tx_frm_download_comp_cb)
- - tx_frm_download_comp_cb(wma_handle->mac_context,
- - tx_frame,
- - WMA_TX_FRAME_BUFFER_FREE);
- WMA_LOGP("%s: Failed to send Mgmt Frame", __func__);
- goto error;
- }
- @@ -25487,8 +25448,7 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
- * callback once the frame is successfully
- * given to txrx module
- */
- - tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame,
- - WMA_TX_FRAME_BUFFER_NO_FREE);
- + tx_frm_download_comp_cb(wma_handle->mac_context, tx_frame, 0);
- }
- return VOS_STATUS_SUCCESS;
- @@ -26993,7 +26953,6 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic,
- struct wma_dfs_radar_indication *radar_event;
- struct hdd_dfs_radar_ind hdd_radar_event;
- void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
- - tpAniSirGlobal pmac = NULL;
- wma = (tp_wma_handle) vos_get_context(VOS_MODULE_ID_WDA, vos_context);
- @@ -27004,9 +26963,6 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic,
- }
- hdd_ctx = vos_get_context(VOS_MODULE_ID_HDD,wma->vos_context);
- - pmac = (tpAniSirGlobal)
- - vos_get_context(VOS_MODULE_ID_PE, wma->vos_context);
- -
- if (wma->dfs_ic != ic)
- {
- WMA_LOGE("%s:DFS- Invalid WMA handle",__func__);
- @@ -27022,11 +26978,8 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic,
- /*
- * Do not post multiple Radar events on the same channel.
- - * But, when DFS test mode is enabled, allow multiple dfs
- - * radar events to be posted on the same channel.
- */
- - if ((ichan->ic_ieee != (wma->dfs_ic->last_radar_found_chan)) ||
- - ( pmac->sap.SapDfsInfo.disable_dfs_ch_switch == VOS_TRUE) )
- + if ( ichan->ic_ieee != (wma->dfs_ic->last_radar_found_chan) )
- {
- wma->dfs_ic->last_radar_found_chan = ichan->ic_ieee;
- /* Indicate the radar event to HDD to stop the netif Tx queues*/
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.h b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.h
- index fa6f7f7..2a3c0e1 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.h
- @@ -83,8 +83,6 @@
- #define WMA_RESUME_TIMEOUT 3000
- #define WMA_TGT_WOW_TX_COMPLETE_TIMEOUT 2000
- #define MAX_MEM_CHUNKS 32
- -#define WMA_CRASH_INJECT_TIMEOUT 5000
- -
- /*
- In prima 12 HW stations are supported including BCAST STA(staId 0)
- and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
- @@ -587,8 +585,6 @@ typedef struct {
- vos_event_t wma_resume_event;
- vos_event_t target_suspend;
- vos_event_t wow_tx_complete;
- - vos_event_t recovery_event;
- -
- t_cfg_nv_param cfg_nv;
- v_U16_t max_station;
- @@ -1130,8 +1126,6 @@ u_int16_t get_regdmn_5g(u_int32_t reg_dmn);
- * TODO: Need to Revist the Timing
- */
- #define WMA_TX_FRAME_COMPLETE_TIMEOUT 1000
- -#define WMA_TX_FRAME_BUFFER_NO_FREE 0
- -#define WMA_TX_FRAME_BUFFER_FREE 1
- struct wma_tx_ack_work_ctx {
- tp_wma_handle wma_handle;
- @@ -1555,7 +1549,4 @@ typedef struct wma_roam_invoke_cmd
- u_int8_t bssid[6];
- v_U32_t channel;
- }t_wma_roam_invoke_cmd;
- -
- -int wma_crash_inject(tp_wma_handle wma_handle, uint32_t type,
- - uint32_t delay_time_ms);
- #endif
- diff --git a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMI/wmi_unified.c b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMI/wmi_unified.c
- index 346ea83..3605741 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SERVICES/WMI/wmi_unified.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SERVICES/WMI/wmi_unified.c
- @@ -235,7 +235,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
- CASE_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
- CASE_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
- CASE_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
- - CASE_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
- +
- /* peer specific commands */
- /** create a peer */
- @@ -486,7 +486,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
- CASE_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
- /** set thermal management params **/
- CASE_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
- - CASE_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
- +
- /* GPIO Configuration */
- CASE_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
- CASE_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
- @@ -576,7 +576,6 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
- CASE_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
- CASE_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
- CASE_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
- - CASE_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
- CASE_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
- CASE_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
- CASE_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
- @@ -622,11 +621,6 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
- CASE_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
- CASE_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
- CASE_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
- - CASE_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
- - CASE_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
- - CASE_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
- - CASE_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
- - CASE_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
- }
- return "Invalid WMI cmd";
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/inc/csrApi.h b/drivers/staging/qcacld-2.0/CORE/SME/inc/csrApi.h
- index 5a4d2ca..c7becac 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/inc/csrApi.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/inc/csrApi.h
- @@ -1242,7 +1242,6 @@ typedef struct tagCsrConfigParam
- tANI_BOOLEAN obssEnabled;
- - v_U16_t pkt_err_disconn_th;
- }tCsrConfigParam;
- //Tush
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/inc/csrInternal.h b/drivers/staging/qcacld-2.0/CORE/SME/inc/csrInternal.h
- index a7a00cb..dad34cd 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/inc/csrInternal.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/inc/csrInternal.h
- @@ -675,7 +675,6 @@ typedef struct tagCsrConfig
- tANI_BOOLEAN isRoamOffloadEnabled;
- #endif
- tANI_BOOLEAN obssEnabled;
- - v_U16_t pkt_err_disconn_th;
- }tCsrConfig;
- typedef struct tagCsrChannelPowerInfo
- @@ -797,9 +796,12 @@ typedef struct tagCsrScanStruct
- tANI_S8 inScanResultBestAPRssi;
- eCsrBand scanBandPreference; //This defines the band perference for scan
- csrScanCompleteCallback callback11dScanDone;
- - bool fcc_constraint;
- }tCsrScanStruct;
- +
- +
- +
- +
- //Save the connected information. This structure + connectedProfile
- //should contain all information about the connection
- typedef struct tagRoamCsrConnectedInfo
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/inc/sme_Api.h b/drivers/staging/qcacld-2.0/CORE/SME/inc/sme_Api.h
- index 69d803da..320d476 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/inc/sme_Api.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/inc/sme_Api.h
- @@ -3802,7 +3802,7 @@ tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
- typedef struct sStatsExtRequestReq {
- tANI_U32 request_data_len;
- - tANI_U8* request_data;
- + const tANI_U8* request_data;
- } tStatsExtRequestReq, *tpStatsExtRequestReq;
- typedef void (* StatsExtCallback)(void *, tStatsExtEvent *);
- @@ -4127,7 +4127,4 @@ uint8_t sme_is_any_session_in_connected_state(tHalHandle h_hal);
- bool smeNeighborRoamIsHandoffInProgress(tHalHandle hHal, tANI_U8 sessionId);
- -eHalStatus sme_disable_non_fcc_channel(tHalHandle hHal,
- - bool fcc_constraint);
- -
- #endif //#if !defined( __SME_API_H )
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiRoam.c b/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiRoam.c
- index 04cebbb0..68973b3 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiRoam.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiRoam.c
- @@ -485,12 +485,6 @@ eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac)
- for (i = 0; i < pScan->base20MHzChannels.numChannels; i++)
- {
- - if (pScan->fcc_constraint) {
- - if (pScan->base20MHzChannels.channelList[i] == 12)
- - continue;
- - if (pScan->base20MHzChannels.channelList[i] == 13)
- - continue;
- - }
- channel_state =
- vos_nv_getChannelEnabledState(
- pScan->base20MHzChannels.channelList[i]);
- @@ -1621,7 +1615,6 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
- if(pParam)
- {
- - pMac->roam.configParam.pkt_err_disconn_th = pParam->pkt_err_disconn_th;
- pMac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode;
- pMac->roam.configParam.Is11eSupportEnabled = pParam->Is11eSupportEnabled;
- pMac->roam.configParam.FragmentationThreshold = pParam->FragmentationThreshold;
- @@ -7857,6 +7850,33 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
- return (status);
- }
- +
- +static boolean is_disconnect_pending(tpAniSirGlobal pmac,
- + uint8_t sessionid)
- +{
- + tListElem *entry = NULL;
- + tListElem *next_entry = NULL;
- + tSmeCmd *command = NULL;
- + bool disconnect_cmd_exist = false;
- +
- + csrLLLock(&pmac->sme.smeCmdPendingList);
- + entry = csrLLPeekHead(&pmac->sme.smeCmdPendingList, LL_ACCESS_NOLOCK);
- + while (entry) {
- + next_entry = csrLLNext(&pmac->sme.smeCmdPendingList,
- + entry, LL_ACCESS_NOLOCK);
- +
- + command = GET_BASE_ADDR(entry, tSmeCmd, Link);
- + if (command && CSR_IS_DISCONNECT_COMMAND(command) &&
- + command->sessionId == sessionid){
- + disconnect_cmd_exist = true;
- + break;
- + }
- + entry = next_entry;
- + }
- + csrLLUnlock(&pmac->sme.smeCmdPendingList);
- + return disconnect_cmd_exist;
- +}
- +
- static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJoinRsp )
- {
- tListElem *pEntry = NULL;
- @@ -7898,6 +7918,7 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
- else
- {
- tANI_U32 roamId = 0;
- + bool is_dis_pending;
- //The head of the active list is the request we sent
- //Try to get back the same profile and roam again
- if(pCommand)
- @@ -7916,7 +7937,14 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
- csrNeighborRoamIndicateConnect(pMac, pSmeJoinRsp->sessionId, VOS_STATUS_E_FAILURE);
- }
- #endif
- - if (pCommand && (pSession->join_bssid_count < CSR_MAX_BSSID_COUNT))
- + /*
- + * if userspace has issued disconnection,
- + * driver should not continue connecting
- + */
- + is_dis_pending = is_disconnect_pending(pMac, pSession->sessionId);
- +
- + if (pCommand && (pSession->join_bssid_count < CSR_MAX_BSSID_COUNT) &&
- + !is_dis_pending)
- {
- if(CSR_IS_WDS_STA( &pCommand->u.roamCmd.roamProfile ))
- {
- @@ -7947,6 +7975,10 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
- if (pSession->join_bssid_count >= CSR_MAX_BSSID_COUNT)
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- FL("Excessive Join Request Failures"));
- +
- + if (is_dis_pending)
- + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- + FL("disconnect is pending, complete roam"));
- pSession->join_bssid_count = 0;
- csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
- }
- @@ -14967,7 +14999,7 @@ eHalStatus csrSendMBAddSelfStaReqMsg( tpAniSirGlobal pMac,
- pMsg->type = pAddStaReq->type;
- pMsg->subType = pAddStaReq->subType;
- pMsg->sessionId = sessionId;
- - pMsg->pkt_err_disconn_th = pMac->roam.configParam.pkt_err_disconn_th;
- +
- smsLog( pMac, LOG1, FL("selfMac="MAC_ADDRESS_STR),
- MAC_ADDR_ARRAY(pMsg->selfMacAddr));
- status = palSendMBMessage(pMac->hHdd, pMsg);
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiScan.c b/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiScan.c
- index ae75a70..44c5802 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiScan.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/src/csr/csrApiScan.c
- @@ -7680,11 +7680,6 @@ void csrSetCfgValidChannelList( tpAniSirGlobal pMac, tANI_U8 *pChannelList, tANI
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
- "Scan offload is enabled, update default chan list");
- - /*
- - * disable fcc constraint since new country code
- - * is being set
- - */
- - pMac->scan.fcc_constraint = false;
- status = csrUpdateChannelList(pMac);
- if (eHAL_STATUS_SUCCESS != status)
- {
- diff --git a/drivers/staging/qcacld-2.0/CORE/SME/src/sme_common/sme_Api.c b/drivers/staging/qcacld-2.0/CORE/SME/src/sme_common/sme_Api.c
- index 6f2b350..ed3e730 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SME/src/sme_common/sme_Api.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SME/src/sme_common/sme_Api.c
- @@ -444,6 +444,8 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
- }
- pEntry = csrLLNext( &pMac->sme.smeCmdPendingList, pEntry, LL_ACCESS_NOLOCK );
- }
- + /* Increament static variable so that it prints pending command only once*/
- + smeCommandQueueFull++;
- csrLLUnlock(&pMac->sme.smeCmdPendingList);
- idx = 1;
- @@ -11620,19 +11622,19 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
- {
- if (pMac->roam.configParam.channelBondingMode5GHz) {
- if ( channel== 36 || channel == 52 || channel == 100 ||
- - channel == 116 || channel == 149 || channel == 132)
- + channel == 116 || channel == 149 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
- }
- else if ( channel == 40 || channel == 56 || channel == 104 ||
- - channel == 120 || channel == 153 || channel == 136)
- + channel == 120 || channel == 153 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
- }
- else if ( channel == 44 || channel == 60 || channel == 108 ||
- - channel == 124 || channel == 157 || channel == 140)
- + channel == 124 || channel == 157 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
- @@ -11643,11 +11645,21 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
- }
- - else if ( channel == 165 )
- + else if ( channel == 165 || channel == 140 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
- }
- + else if ( channel == 132 )
- + {
- + smeConfig.csrConfig.channelBondingMode5GHz =
- + eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
- + }
- + else if ( channel == 136 )
- + {
- + smeConfig.csrConfig.channelBondingMode5GHz =
- + eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
- + }
- }
- /*TODO: Set HT40+ / HT40- for channel 5-7 based on ACS */
- if (pMac->roam.configParam.channelBondingMode24GHz) {
- @@ -11661,6 +11673,7 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
- smeConfig.csrConfig.channelBondingMode24GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
- }
- +
- }
- #endif
- @@ -11671,7 +11684,7 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
- if ( channel== 40 || channel == 48 || channel == 56 ||
- channel == 64 || channel == 104 || channel == 112 ||
- channel == 120 || channel == 128 || channel == 136 ||
- - channel == 153 || channel == 161 || channel == 144)
- + channel == 153 || channel == 161 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
- @@ -11679,12 +11692,12 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
- else if ( channel== 36 || channel == 44 || channel == 52 ||
- channel == 60 || channel == 100 || channel == 108 ||
- channel == 116 || channel == 124 || channel == 132 ||
- - channel == 149 || channel == 157 || channel == 140)
- + channel == 149 || channel == 157 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
- }
- - else if ( channel == 165 )
- + else if ( channel == 165 || channel == 140)
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
- @@ -13168,7 +13181,7 @@ void sme_StatsExtRegisterCallback(tHalHandle hHal, StatsExtCallback callback)
- \return eHalStatus
- ******************************************************************************/
- -eHalStatus sme_StatsExtRequest(tANI_U8 session_id, tpStatsExtRequestReq input)
- +eHalStatus sme_StatsExtRequest(tANI_U8 session_id, const tpStatsExtRequestReq input)
- {
- vos_msg_t msg;
- tpStatsExtRequest data;
- @@ -14302,32 +14315,3 @@ bool smeNeighborRoamIsHandoffInProgress(tHalHandle hHal, tANI_U8 sessionId)
- {
- return csrNeighborRoamIsHandoffInProgress(PMAC_STRUCT(hHal), sessionId);
- }
- -
- -/**
- - * sme_disable_non_fcc_channel() - non-fcc channel disable request
- - * @hal: HAL pointer
- - * @fcc_constraint: true: disable, false; enable
- - *
- - * Return: eHalStatus.
- - */
- -eHalStatus sme_disable_non_fcc_channel(tHalHandle hal, bool fcc_constraint)
- -{
- - eHalStatus status = eHAL_STATUS_SUCCESS;
- - tpAniSirGlobal mac_ptr = PMAC_STRUCT(hal);
- -
- - status = sme_AcquireGlobalLock(&mac_ptr->sme);
- -
- - if (eHAL_STATUS_SUCCESS == status) {
- -
- - if (fcc_constraint != mac_ptr->scan.fcc_constraint) {
- - mac_ptr->scan.fcc_constraint = fcc_constraint;
- -
- - /* update the channel list to the firmware */
- - status = csrUpdateChannelList(mac_ptr);
- - }
- -
- - sme_ReleaseGlobalLock(&mac_ptr->sme);
- - }
- -
- - return status;
- -}
- diff --git a/drivers/staging/qcacld-2.0/CORE/SVC/inc/wlan_nlink_srv.h b/drivers/staging/qcacld-2.0/CORE/SVC/inc/wlan_nlink_srv.h
- index e48e936..f746626 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SVC/inc/wlan_nlink_srv.h
- +++ b/drivers/staging/qcacld-2.0/CORE/SVC/inc/wlan_nlink_srv.h
- @@ -44,7 +44,6 @@
- #include <net/netlink.h>
- #include <wlan_nlink_common.h>
- -#define INVALID_PID -1
- #define NLINK_MAX_CALLBACKS (WLAN_NL_MSG_MAX - WLAN_NL_MSG_BASE)
- typedef int (* nl_srv_msg_callback)(struct sk_buff * skb);
- @@ -59,4 +58,8 @@ int nl_srv_register(tWlanNlModTypes msg_type, nl_srv_msg_callback msg_handler);
- int nl_srv_unregister(tWlanNlModTypes msg_type, nl_srv_msg_callback msg_handler);
- int nl_srv_ucast(struct sk_buff * skb, int dst_pid, int flag);
- int nl_srv_bcast(struct sk_buff * skb);
- +#ifdef WLAN_KD_READY_NOTIFIER
- +void nl_srv_nl_ready_indication(void);
- +void nl_srv_nl_close_indication(int pid);
- +#endif /* WLAN_KD_READY_NOTIFIER */
- #endif
- diff --git a/drivers/staging/qcacld-2.0/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/drivers/staging/qcacld-2.0/CORE/SVC/src/logging/wlan_logging_sock_svc.c
- index 8183c63..8f2eaf2 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SVC/src/logging/wlan_logging_sock_svc.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SVC/src/logging/wlan_logging_sock_svc.c
- @@ -49,6 +49,8 @@
- #define ANI_NL_MSG_LOG_TYPE 89
- #define ANI_NL_MSG_READY_IND_TYPE 90
- +#define INVALID_PID -1
- +
- #define MAX_LOGMSG_LENGTH 4096
- struct log_msg {
- @@ -95,6 +97,64 @@ static struct log_msg *gplog_msg;
- /* PID of the APP to log the message */
- static int gapp_pid = INVALID_PID;
- +static char wlan_logging_ready[] = "WLAN LOGGING READY";
- +
- +/*
- + * Broadcast Logging service ready indication to any Logging application
- + * Each netlink message will have a message of type tAniMsgHdr inside.
- + */
- +void wlan_logging_srv_nl_ready_indication(void)
- +{
- + struct sk_buff *skb = NULL;
- + struct nlmsghdr *nlh;
- + tAniNlHdr *wnl = NULL;
- + int payload_len;
- + int err;
- + static int rate_limit;
- +
- + payload_len = sizeof(tAniHdr) + sizeof(wlan_logging_ready) +
- + sizeof(wnl->radio);
- + skb = dev_alloc_skb(NLMSG_SPACE(payload_len));
- + if (NULL == skb) {
- + if (!rate_limit) {
- + LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- + "NLINK: skb alloc fail %s", __func__);
- + }
- + rate_limit = 1;
- + return;
- + }
- + rate_limit = 0;
- +
- + nlh = nlmsg_put(skb, 0, 0, ANI_NL_MSG_LOG, payload_len,
- + NLM_F_REQUEST);
- + if (NULL == nlh) {
- + LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
- + "%s: nlmsg_put() failed for msg size[%d]",
- + __func__, payload_len);
- + kfree_skb(skb);
- + return;
- + }
- +
- + wnl = (tAniNlHdr *) nlh;
- + wnl->radio = 0;
- + wnl->wmsg.type = ANI_NL_MSG_READY_IND_TYPE;
- + wnl->wmsg.length = sizeof(wlan_logging_ready);
- + memcpy((char*)&wnl->wmsg + sizeof(tAniHdr),
- + wlan_logging_ready,
- + sizeof(wlan_logging_ready));
- +
- + /* sender is in group 1<<0 */
- + NETLINK_CB(skb).dst_group = WLAN_NLINK_MCAST_GRP_ID;
- +
- + /*multicast the message to all listening processes*/
- + err = nl_srv_bcast(skb);
- + if (err) {
- + LOGGING_TRACE(VOS_TRACE_LEVEL_INFO_LOW,
- + "NLINK: Ready Indication Send Fail %s, err %d",
- + __func__, err);
- + }
- + return;
- +}
- /* Utility function to send a netlink message to an application
- * in user space
- @@ -397,6 +457,7 @@ static int send_filled_buffers_to_user(void)
- skb = NULL;
- gapp_pid = INVALID_PID;
- clear_default_logtoapp_log_level();
- + wlan_logging_srv_nl_ready_indication();
- } else {
- skb = NULL;
- ret = 0;
- @@ -558,6 +619,8 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
- nl_srv_register(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg);
- + /*Broadcast SVC ready message to logging app/s running*/
- + wlan_logging_srv_nl_ready_indication();
- pr_info("%s: Activated wlan_logging svc\n", __func__);
- return 0;
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/SVC/src/nlink/wlan_nlink_srv.c b/drivers/staging/qcacld-2.0/CORE/SVC/src/nlink/wlan_nlink_srv.c
- index d212aea..c9cdc7e 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SVC/src/nlink/wlan_nlink_srv.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SVC/src/nlink/wlan_nlink_srv.c
- @@ -43,12 +43,17 @@
- #include <wlan_nlink_srv.h>
- #include <vos_trace.h>
- -/* Global variables */
- +//Global variables
- static DEFINE_MUTEX(nl_srv_sem);
- static struct sock *nl_srv_sock;
- static nl_srv_msg_callback nl_srv_msg_handler[NLINK_MAX_CALLBACKS];
- -/* Forward declaration */
- +#ifdef WLAN_KD_READY_NOTIFIER
- +const char driverLoaded[] = "KNLREADY";
- +const char driverUnLoaded[] = "KNLCLOSE";
- +#endif /* WLAN_KD_READY_NOTIFIER */
- +
- +//Forward declaration
- static void nl_srv_rcv (struct sk_buff *sk);
- static void nl_srv_rcv_skb (struct sk_buff *skb);
- static void nl_srv_rcv_msg (struct sk_buff *skb, struct nlmsghdr *nlh);
- @@ -98,6 +103,12 @@ void nl_srv_exit(int dst_pid)
- void nl_srv_exit(void)
- #endif /* WLAN_KD_READY_NOTIFIER */
- {
- +#ifdef WLAN_KD_READY_NOTIFIER
- + if (0 != dst_pid)
- + {
- + nl_srv_nl_close_indication(dst_pid);
- + }
- +#endif /* WLAN_KD_READY_NOTIFIER */
- netlink_kernel_release(nl_srv_sock);
- }
- @@ -287,3 +298,93 @@ static void nl_srv_rcv_msg (struct sk_buff *skb, struct nlmsghdr *nlh)
- "NLINK: No handler for Netlink Msg [0x%X]", type);
- }
- }
- +
- +#ifdef WLAN_KD_READY_NOTIFIER
- +/*
- + * Send Net Link interface ready indication to application daemon
- + * Each netlink message will have a message of type tAniMsgHdr inside.
- + */
- +void nl_srv_nl_ready_indication
- +(
- + void
- +)
- +{
- + struct sk_buff *skb = NULL;
- + struct nlmsghdr *nlh;
- + int err;
- +
- + skb = alloc_skb(NLMSG_SPACE(sizeof(driverLoaded)), GFP_KERNEL);
- + if (NULL == skb)
- + {
- + VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + "NLINK: skb alloc fail %s", __func__);
- + return;
- + }
- +
- + nlh = (struct nlmsghdr *)skb->data;
- + nlh->nlmsg_pid = 0; /* from kernel */
- + nlh->nlmsg_flags = 0;
- + nlh->nlmsg_seq = 0;
- + nlh->nlmsg_len = sizeof(driverLoaded);
- + memcpy(((char *)nlh) + sizeof(struct nlmsghdr),
- + driverLoaded,
- + sizeof(driverLoaded));
- + skb_put(skb, NLMSG_SPACE(sizeof(driverLoaded)));
- +
- + /* sender is in group 1<<0 */
- + NETLINK_CB(skb).dst_group = WLAN_NLINK_MCAST_GRP_ID;
- +
- + /*multicast the message to all listening processes*/
- + err = netlink_broadcast(nl_srv_sock, skb, 0, 1, GFP_KERNEL);
- + if (err)
- + {
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_LOW,
- + "NLINK: Ready Indication Send Fail %s, err %d",
- + __func__, err);
- + }
- + return;
- +}
- +
- +/*
- + * Send Net Link interface close indication to application daemon
- + * Each netlink message will have a message of type tAniMsgHdr inside.
- + */
- +void nl_srv_nl_close_indication
- +(
- + int pid
- +)
- +{
- + struct sk_buff *skb = NULL;
- + struct nlmsghdr *nlh;
- + int err;
- +
- + skb = alloc_skb(sizeof(driverUnLoaded),GFP_KERNEL);
- + if (NULL == skb)
- + {
- + VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- + "NLINK: skb alloc fail %s", __func__);
- + return;
- + }
- +
- + nlh = (struct nlmsghdr *)skb->data;
- + nlh->nlmsg_pid = 0; /* from kernel */
- + nlh->nlmsg_flags = 0;
- + nlh->nlmsg_seq = 0;
- + nlh->nlmsg_len = sizeof(driverUnLoaded);
- + memcpy(((char *)nlh) + sizeof(struct nlmsghdr),
- + driverUnLoaded,
- + sizeof(driverUnLoaded));
- + skb_put(skb, NLMSG_SPACE(sizeof(driverUnLoaded)));
- +
- + /* sender is in group 1<<0 */
- + NETLINK_CB(skb).dst_group = 0;
- + err = netlink_unicast(nl_srv_sock, skb, pid, MSG_DONTWAIT);
- + if (err)
- + {
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_LOW,
- + "NLINK: Close Indication Send Fail %s", __func__);
- + }
- +
- + return;
- +}
- +#endif /* WLAN_KD_READY_NOTIFIER */
- diff --git a/drivers/staging/qcacld-2.0/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c b/drivers/staging/qcacld-2.0/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
- index 2264d34..d2ea494 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
- @@ -115,11 +115,15 @@ static void ptt_sock_proc_reg_req(tAniHdr *wmsg, int radio)
- tAniNlAppRegRsp rspmsg;
- reg_req = (tAniNlAppRegReq *)(wmsg + 1);
- memset((char *)&rspmsg, 0, sizeof(rspmsg));
- - /* send reg response message to the application */
- + //send reg response message to the application
- rspmsg.ret = ANI_NL_MSG_OK;
- rspmsg.regReq.type = reg_req->type;
- -
- - /* Save the pid */
- +#ifdef WLAN_KD_READY_NOTIFIER
- + /* NL client try to registration
- + * to make sure connection, broadcast READY notification */
- + nl_srv_nl_ready_indication();
- +#endif /* WLAN_KD_READY_NOTIFIER */
- + /*Save the pid*/
- pAdapterHandle->ptt_pid = reg_req->pid;
- rspmsg.regReq.pid= reg_req->pid;
- rspmsg.wniHdr.type = cpu_to_be16(ANI_MSG_APP_REG_RSP);
- @@ -162,7 +166,7 @@ static int ptt_sock_rx_nlink_msg (struct sk_buff * skb)
- radio = wnl->radio;
- type = wnl->nlh.nlmsg_type;
- switch (type) {
- - case ANI_NL_MSG_PUMAC: // Message from the PTT socket APP
- + case ANI_NL_MSG_PUMAC: //Message from the PTT socket APP
- PTT_TRACE(VOS_TRACE_LEVEL_INFO, "%s: Received ANI_NL_MSG_PUMAC Msg [0x%X]\n",
- __func__, type);
- ptt_proc_pumac_msg(skb, &wnl->wmsg, radio);
- @@ -176,9 +180,11 @@ static int ptt_sock_rx_nlink_msg (struct sk_buff * skb)
- int ptt_sock_activate_svc(void *pAdapter)
- {
- pAdapterHandle = (struct hdd_context_s*)pAdapter;
- - pAdapterHandle->ptt_pid = INVALID_PID;
- nl_srv_register(ANI_NL_MSG_PUMAC, ptt_sock_rx_nlink_msg);
- nl_srv_register(ANI_NL_MSG_PTT, ptt_sock_rx_nlink_msg);
- +#ifdef WLAN_KD_READY_NOTIFIER
- + nl_srv_nl_ready_indication();
- +#endif /* WLAN_KD_READY_NOTIFIER */
- return 0;
- }
- -#endif // PTT_SOCK_SVC_ENABLE
- +#endif //PTT_SOCK_SVC_ENABLE
- diff --git a/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/macInitApi.c b/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/macInitApi.c
- index 21a0d50..d50a868 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/macInitApi.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/macInitApi.c
- @@ -62,14 +62,41 @@ tSirRetStatus macReset(tpAniSirGlobal pMac, tANI_U32 rc);
- tSirRetStatus macPreStart(tHalHandle hHal)
- {
- + tSirRetStatus status = eSIR_SUCCESS;
- + tANI_BOOLEAN memAllocFailed = eANI_BOOLEAN_FALSE;
- tpAniSirGlobal pMac = (tpAniSirGlobal) hHal;
- + tANI_U8 i;
- +
- + for(i=0; i<MAX_DUMP_TABLE_ENTRY; i++)
- + {
- + pMac->dumpTableEntry[i] = vos_mem_malloc(sizeof(tDumpModuleEntry));
- + if ( NULL == pMac->dumpTableEntry[i] )
- + {
- + memAllocFailed = eANI_BOOLEAN_TRUE;
- + break;
- + }
- + else
- + {
- + vos_mem_set(pMac->dumpTableEntry[i], sizeof(tSirMbMsg), 0);
- + }
- + }
- + if( memAllocFailed )
- + {
- + while(i>0)
- + {
- + i--;
- + vos_mem_free(pMac->dumpTableEntry[i]);
- + }
- + sysLog(pMac, LOGE, FL("pMac->dumpTableEntry is NULL\n"));
- + status = eSIR_FAILURE;
- + }
- #if defined(ANI_LOGDUMP)
- //logDumpInit must be called before any module starts
- logDumpInit(pMac);
- #endif //#if defined(ANI_LOGDUMP)
- - return eSIR_SUCCESS;
- + return status;
- }
- tSirRetStatus macStart(tHalHandle hHal, void* pHalMacStartParams)
- @@ -125,6 +152,7 @@ tSirRetStatus macStart(tHalHandle hHal, void* pHalMacStartParams)
- tSirRetStatus macStop(tHalHandle hHal, tHalStopType stopType)
- {
- + tANI_U8 i;
- tpAniSirGlobal pMac = (tpAniSirGlobal) hHal;
- peStop(pMac);
- cfgCleanup( pMac );
- @@ -135,6 +163,11 @@ tSirRetStatus macStop(tHalHandle hHal, tHalStopType stopType)
- vos_mem_free(pMac->pResetMsg);
- pMac->pResetMsg = NULL;
- }
- + /* Free the DumpTableEntry */
- + for(i=0; i<MAX_DUMP_TABLE_ENTRY; i++)
- + {
- + vos_mem_free(pMac->dumpTableEntry[i]);
- + }
- return eSIR_SUCCESS;
- }
- @@ -153,8 +186,6 @@ tSirRetStatus macOpen(tHalHandle *pHalHandle, tHddHandle hHdd, tMacOpenParameter
- {
- tpAniSirGlobal p_mac = NULL;
- tSirRetStatus status = eSIR_SUCCESS;
- - uint8_t i =0;
- - bool mem_alloc_failed = false;
- if(pHalHandle == NULL)
- return eSIR_FAILURE;
- @@ -215,34 +246,6 @@ tSirRetStatus macOpen(tHalHandle *pHalHandle, tHddHandle hHdd, tMacOpenParameter
- if (eSIR_SUCCESS != status) {
- vos_mem_free(p_mac);
- sysLog(p_mac, LOGE, FL("macOpen failure\n"));
- - return status;
- - }
- -
- - for (i=0; i<MAX_DUMP_TABLE_ENTRY; i++)
- - {
- - p_mac->dumpTableEntry[i] = vos_mem_malloc(sizeof(tDumpModuleEntry));
- - if (NULL == p_mac->dumpTableEntry[i])
- - {
- - mem_alloc_failed = eANI_BOOLEAN_TRUE;
- - break;
- - }
- - else
- - {
- - vos_mem_set(p_mac->dumpTableEntry[i], sizeof(tSirMbMsg), 0);
- - }
- - }
- -
- - if (mem_alloc_failed)
- - {
- - while (i>0)
- - {
- - i--;
- - vos_mem_free(p_mac->dumpTableEntry[i]);
- - }
- -
- - peClose(p_mac);
- - vos_mem_free(p_mac);
- - return eSIR_FAILURE;
- }
- return status;
- @@ -260,7 +263,6 @@ tSirRetStatus macClose(tHalHandle hHal)
- {
- tpAniSirGlobal pMac = (tpAniSirGlobal) hHal;
- - uint8_t i =0;
- peClose(pMac);
- pMac->psOffloadEnabled = FALSE;
- @@ -270,12 +272,6 @@ tSirRetStatus macClose(tHalHandle hHal)
- logDeinit(pMac);
- - /* Free the DumpTableEntry */
- - for(i=0; i<MAX_DUMP_TABLE_ENTRY; i++)
- - {
- - vos_mem_free(pMac->dumpTableEntry[i]);
- - }
- -
- // Finally, de-allocate the global MAC datastructure:
- vos_mem_free( pMac );
- diff --git a/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/sysEntryFunc.c b/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
- index 01082e7..ec3bd6f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
- +++ b/drivers/staging/qcacld-2.0/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
- @@ -190,9 +190,7 @@ sysBbtProcessMessageCore(tpAniSirGlobal pMac, tpSirMsgQ pMsg, tANI_U32 type,
- ret = (tSirRetStatus) limPostMsgApi(pMac, pMsg);
- if (ret != eSIR_SUCCESS)
- {
- - /* Print only one debug failure out of 512 failure messages */
- - if(pMac->sys.gSysBbtReceived & 0x0200)
- - sysLog(pMac, LOGE, FL("posting to LIM2 failed, ret %d\n"), ret);
- + PELOGE(sysLog(pMac, LOGE, FL("posting to LIM2 failed, ret %d\n"), ret);)
- goto fail;
- }
- pMac->sys.gSysBbtPostedToLim++;
- diff --git a/drivers/staging/qcacld-2.0/CORE/TL/inc/wlan_qct_tl.h b/drivers/staging/qcacld-2.0/CORE/TL/inc/wlan_qct_tl.h
- index 1051889..186fc8f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/TL/inc/wlan_qct_tl.h
- +++ b/drivers/staging/qcacld-2.0/CORE/TL/inc/wlan_qct_tl.h
- @@ -2946,8 +2946,6 @@ WLANTL_TLDebugMessage
- }
- -void WLANTL_PauseUnPauseQs(void *vos_context, v_BOOL_t flag);
- -
- #ifdef QCA_LL_TX_FLOW_CT
- /*=============================================================================
- FUNCTION WLANTL_GetTxResource
- diff --git a/drivers/staging/qcacld-2.0/CORE/UTILS/FWLOG/dbglog_host.c b/drivers/staging/qcacld-2.0/CORE/UTILS/FWLOG/dbglog_host.c
- index 82af3c2..0251f86 100644
- --- a/drivers/staging/qcacld-2.0/CORE/UTILS/FWLOG/dbglog_host.c
- +++ b/drivers/staging/qcacld-2.0/CORE/UTILS/FWLOG/dbglog_host.c
- @@ -60,7 +60,7 @@
- static bool appstarted = FALSE;
- static bool senddriverstatus = FALSE;
- static bool kd_nl_init = FALSE;
- -static int cnss_diag_pid = INVALID_PID;
- +static int cnss_diag_pid = 0;
- static int get_version = 0;
- static int gprint_limiter = 0;
- @@ -1647,7 +1647,13 @@ send_fw_diag_nl_data(wmi_unified_t wmi_handle, const u_int8_t *buffer,
- if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE))
- return -ENODEV;
- - if (cnss_diag_pid != INVALID_PID)
- + /* NL is not ready yet, WLAN KO started first */
- + if ((kd_nl_init) && (!cnss_diag_pid))
- + {
- + nl_srv_nl_ready_indication();
- + }
- +
- + if (cnss_diag_pid)
- {
- skb_out = nlmsg_new(len, 0);
- if (!skb_out)
- @@ -1664,7 +1670,6 @@ send_fw_diag_nl_data(wmi_unified_t wmi_handle, const u_int8_t *buffer,
- {
- AR_DEBUG_PRINTF(ATH_DEBUG_RSVD1,
- ("nl_srv_ucast failed 0x%x \n", res));
- - cnss_diag_pid = INVALID_PID;
- return res;
- }
- }
- @@ -1684,7 +1689,12 @@ send_diag_netlink_data(const u_int8_t *buffer,
- if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE))
- return -ENODEV;
- - if (cnss_diag_pid != INVALID_PID) {
- + /* NL is not ready yet, WLAN KO started first */
- + if ((kd_nl_init) && (!cnss_diag_pid)) {
- + nl_srv_nl_ready_indication();
- + }
- +
- + if (cnss_diag_pid) {
- slot_len = sizeof(*slot) + ATH6KL_FWLOG_PAYLOAD_SIZE;
- skb_out = nlmsg_new(slot_len, 0);
- @@ -1708,7 +1718,6 @@ send_diag_netlink_data(const u_int8_t *buffer,
- if (res < 0) {
- AR_DEBUG_PRINTF(ATH_DEBUG_RSVD1,
- ("nl_srv_ucast failed 0x%x \n", res));
- - cnss_diag_pid = INVALID_PID;
- return res;
- }
- }
- @@ -1729,7 +1738,13 @@ dbglog_process_netlink_data(wmi_unified_t wmi_handle, const u_int8_t *buffer,
- if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE))
- return -ENODEV;
- - if (cnss_diag_pid != INVALID_PID)
- + /* NL is not ready yet, WLAN KO started first */
- + if ((kd_nl_init) && (!cnss_diag_pid))
- + {
- + nl_srv_nl_ready_indication();
- + }
- +
- + if (cnss_diag_pid)
- {
- slot_len = sizeof(*slot) + ATH6KL_FWLOG_PAYLOAD_SIZE;
- @@ -1754,7 +1769,6 @@ dbglog_process_netlink_data(wmi_unified_t wmi_handle, const u_int8_t *buffer,
- {
- AR_DEBUG_PRINTF(ATH_DEBUG_RSVD1,
- ("nl_srv_ucast failed 0x%x \n", res));
- - cnss_diag_pid = INVALID_PID;
- return res;
- }
- }
- @@ -4043,6 +4057,7 @@ int cnss_diag_notify_wlan_close()
- if (0 != cnss_diag_pid)
- {
- cnss_diag_send_driver_unloaded();
- + nl_srv_nl_close_indication(cnss_diag_pid);
- cnss_diag_pid = 0;
- }
- return 0;
- diff --git a/drivers/staging/qcacld-2.0/CORE/UTILS/PKTLOG/pktlog_ac.c b/drivers/staging/qcacld-2.0/CORE/UTILS/PKTLOG/pktlog_ac.c
- index 1bd434e..8010176 100644
- --- a/drivers/staging/qcacld-2.0/CORE/UTILS/PKTLOG/pktlog_ac.c
- +++ b/drivers/staging/qcacld-2.0/CORE/UTILS/PKTLOG/pktlog_ac.c
- @@ -341,6 +341,7 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
- return 0;
- if (log_state != 0 && !pl_dev->tgt_pktlog_enabled) {
- +
- if (pl_info->buf == NULL) {
- error = pktlog_alloc_buf(scn);
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/inc/wlan_hdd_misc.h b/drivers/staging/qcacld-2.0/CORE/VOSS/inc/wlan_hdd_misc.h
- index 8b94ccf..6235571 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/inc/wlan_hdd_misc.h
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/inc/wlan_hdd_misc.h
- @@ -44,4 +44,7 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName, v_VOID_t *pBuffer,
- tVOS_CONCURRENCY_MODE hdd_get_concurrency_mode ( void );
- +// BEGIN MOTOROLA IKJB42MAIN-274, dpn473, 01/02/2013, Add flag to disable/enable MCC mode
- +v_U8_t hdd_get_mcc_mode( void );
- +// END IKJB42MAIN-274
- #endif /* WLAN_HDD_MISC_H */
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_api.c b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_api.c
- index 4aec700..12b1bb3 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_api.c
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_api.c
- @@ -93,7 +93,7 @@
- #elif defined(HIF_SDIO)
- #include "if_ath_sdio.h"
- #endif
- -#include "wma.h"
- +
- /*---------------------------------------------------------------------------
- * Preprocessor Definitions and Constants
- @@ -704,6 +704,7 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext )
- {
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_FATAL,
- "Failed to WDA prestart");
- + macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
- ccmStop(gpVosContext->pMACContext);
- VOS_ASSERT(0);
- return VOS_STATUS_E_FAILURE;
- @@ -728,6 +729,7 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext )
- "%s: Test MC thread by posting a probe message to SYS", __func__);
- wlan_sys_probe();
- + macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
- ccmStop(gpVosContext->pMACContext);
- VOS_ASSERT( 0 );
- return VOS_STATUS_E_FAILURE;
- @@ -738,6 +740,7 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext )
- {
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_FATAL,
- "Failed to Start HTC");
- + macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
- ccmStop(gpVosContext->pMACContext);
- VOS_ASSERT( 0 );
- return VOS_STATUS_E_FAILURE;
- @@ -748,6 +751,7 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext )
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_FATAL,
- "Failed to get ready event from target firmware");
- HTCSetTargetToSleep(scn);
- + macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
- ccmStop(gpVosContext->pMACContext);
- HTCStop(gpVosContext->htc_ctx);
- VOS_ASSERT( 0 );
- @@ -2453,47 +2457,22 @@ v_BOOL_t vos_is_packet_log_enabled(void)
- return pHddCtx->cfg_ini->enablePacketLog;
- }
- +#if defined(CONFIG_CNSS)
- +/* worker thread to recover when target does not respond over PCIe */
- +void self_recovery_work_handler(struct work_struct *recovery)
- +{
- + cnss_device_self_recovery();
- +}
- +
- +static DECLARE_WORK(self_recovery_work, self_recovery_work_handler);
- +#endif
- +
- void vos_trigger_recovery(void)
- {
- - pVosContextType vos_context;
- - tp_wma_handle wma_handle;
- - VOS_STATUS status = VOS_STATUS_SUCCESS;
- -
- - vos_context = vos_get_global_context(VOS_MODULE_ID_VOSS, NULL);
- - if (!vos_context) {
- - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- - "VOS context is invald!");
- - return;
- - }
- -
- - wma_handle = (tp_wma_handle)vos_get_context(VOS_MODULE_ID_WDA,
- - vos_context);
- - if (!wma_handle) {
- - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- - "WMA context is invald!");
- - return;
- - }
- -
- - wma_crash_inject(wma_handle, RECOVERY_SIM_SELF_RECOVERY, 0);
- -
- - status = vos_wait_single_event(&wma_handle->recovery_event,
- - WMA_CRASH_INJECT_TIMEOUT);
- -
- - if (VOS_STATUS_SUCCESS != status) {
- - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- - "CRASH_INJECT command is timed out!");
- #ifdef CONFIG_CNSS
- - if (vos_is_logp_in_progress(VOS_MODULE_ID_VOSS, NULL)) {
- - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- - "LOGP is in progress, ignore!");
- - return;
- - }
- - vos_set_logp_in_progress(VOS_MODULE_ID_VOSS, TRUE);
- - cnss_schedule_recovery_work();
- + vos_set_logp_in_progress(VOS_MODULE_ID_VOSS, TRUE);
- + schedule_work(&self_recovery_work);
- #endif
- -
- - return;
- - }
- }
- v_U64_t vos_get_monotonic_boottime(void)
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_diag.c b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_diag.c
- index 89de189..24d6829 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_diag.c
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_diag.c
- @@ -143,6 +143,14 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr)
- return;
- }
- +#ifdef WLAN_KD_READY_NOTIFIER
- + /* NL is not ready yet, WLAN KO started first */
- + if ((pHddCtx->kd_nl_init) && (!pHddCtx->ptt_pid))
- + {
- + nl_srv_nl_ready_indication();
- + }
- +#endif /* WLAN_KD_READY_NOTIFIER */
- +
- /* Send the log data to the ptt app only if it is registered with the wlan driver*/
- if(pHddCtx->ptt_pid)
- {
- @@ -174,13 +182,12 @@ void vos_log_submit(v_VOID_t *plog_hdr_ptr)
- memcpy(pBuf, pHdr,data_len);
- - if(pHddCtx->ptt_pid != INVALID_PID)
- + if(pHddCtx->ptt_pid)
- {
- if( ptt_sock_send_msg_to_app(wmsg, 0, ANI_NL_MSG_PUMAC, pHddCtx->ptt_pid) < 0) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- ("Ptt Socket error sending message to the app!!"));
- vos_mem_free((v_VOID_t *)wmsg);
- - pHddCtx->ptt_pid = INVALID_PID;
- return;
- }
- @@ -219,8 +226,16 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo
- /*Get the Hdd Context */
- pHddCtx = ((VosContextType*)(pVosContext))->pHDDContext;
- +#ifdef WLAN_KD_READY_NOTIFIER
- + /* NL is not ready yet, WLAN KO started first */
- + if ((pHddCtx->kd_nl_init) && (!pHddCtx->ptt_pid))
- + {
- + nl_srv_nl_ready_indication();
- + }
- +#endif /* WLAN_KD_READY_NOTIFIER */
- +
- /* Send the log data to the ptt app only if it is registered with the wlan driver*/
- - if(pHddCtx->ptt_pid != INVALID_PID)
- + if(pHddCtx->ptt_pid)
- {
- total_len = sizeof(tAniHdr)+sizeof(event_report_t)+length;
- @@ -250,7 +265,6 @@ void vos_event_report_payload(v_U16_t event_Id, v_U16_t length, v_VOID_t *pPaylo
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- ("Ptt Socket error sending message to the app!!"));
- vos_mem_free((v_VOID_t*)wmsg);
- - pHddCtx->ptt_pid = INVALID_PID;
- return;
- }
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_nvitem.c b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_nvitem.c
- index 6201329..38b1da9 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_nvitem.c
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_nvitem.c
- @@ -95,8 +95,7 @@ static v_BOOL_t init_by_reg_core = VOS_FALSE;
- NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
- #define REG_RULE_2GHZ_ALL REG_RULE_2GHZ_CH01_11, \
- - REG_RULE_2GHZ_CH12_13, \
- -REG_RULE_2GHZ_CH14
- + REG_RULE_2GHZ_CH12_13
- #define REG_RULE_5GHZ_ALL REG_RULE_5GHZ_5150_5350, \
- REG_RULE_5GHZ_5470_5850
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_sched.c b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_sched.c
- index 401c6e2..2ff3b9f 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_sched.c
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_sched.c
- @@ -1008,7 +1008,7 @@ VosMCThread
- } // while message loop processing
- } // while TRUE
- // If we get here the MC thread must exit
- - VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- + VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
- "%s: MC Thread exiting!!!!", __func__);
- complete_and_exit(&pSchedContext->McShutdown, 0);
- } /* VosMCThread() */
- @@ -2427,6 +2427,8 @@ void vos_ssr_protect(const char *caller_func)
- unsigned long irq_flags;
- count = atomic_inc_return(&ssr_protect_entry_count);
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- + "%s: ENTRY ACTIVE %d", caller_func, count);
- spin_lock_irqsave(&ssr_protect_lock, irq_flags);
- @@ -2466,6 +2468,8 @@ void vos_ssr_unprotect(const char *caller_func)
- unsigned long irq_flags;
- count = atomic_dec_return(&ssr_protect_entry_count);
- + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- + "%s: ENTRY INACTIVE %d", caller_func, count);
- spin_lock_irqsave(&ssr_protect_lock, irq_flags);
- diff --git a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_timer.c b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_timer.c
- index 9ea7e72..afaf4a4 100644
- --- a/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_timer.c
- +++ b/drivers/staging/qcacld-2.0/CORE/VOSS/src/vos_timer.c
- @@ -443,10 +443,7 @@ VOS_STATUS vos_timer_init_debug( vos_timer_t *timer, VOS_TIMER_TYPE timerType,
- // set the various members of the timer structure
- // with arguments passed or with default values
- spin_lock_init(&timer->platformInfo.spinlock);
- - if (VOS_TIMER_TYPE_SW == timerType)
- - init_timer_deferrable(&(timer->platformInfo.Timer));
- - else
- - init_timer(&(timer->platformInfo.Timer));
- + init_timer(&(timer->platformInfo.Timer));
- timer->platformInfo.Timer.function = vos_linux_timer_callback;
- timer->platformInfo.Timer.data = (unsigned long)timer;
- timer->callback = callback;
- @@ -474,10 +471,7 @@ VOS_STATUS vos_timer_init( vos_timer_t *timer, VOS_TIMER_TYPE timerType,
- // set the various members of the timer structure
- // with arguments passed or with default values
- spin_lock_init(&timer->platformInfo.spinlock);
- - if (VOS_TIMER_TYPE_SW == timerType)
- - init_timer_deferrable(&(timer->platformInfo.Timer));
- - else
- - init_timer(&(timer->platformInfo.Timer));
- + init_timer(&(timer->platformInfo.Timer));
- timer->platformInfo.Timer.function = vos_linux_timer_callback;
- timer->platformInfo.Timer.data = (unsigned long)timer;
- timer->callback = callback;
- diff --git a/drivers/staging/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h b/drivers/staging/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h
- index ec1306d..cff5fad 100644
- --- a/drivers/staging/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h
- +++ b/drivers/staging/qcacld-2.0/CORE/WDA/inc/legacy/halMsgApi.h
- @@ -632,8 +632,6 @@ typedef enum eSmpsModeValue{
- // Msg Type = SIR_LIM_DELETE_STA_CONTEXT_IND
- //
- typedef struct {
- - bool is_tdls;
- - tANI_U8 vdev_id;
- tANI_U16 assocId;
- tANI_U16 staId;
- tSirMacAddr bssId; // TO SUPPORT BT-AMP
- @@ -1418,13 +1416,12 @@ typedef struct sMaxTxPowerPerBandParams
- typedef struct sAddStaSelfParams
- {
- - tSirMacAddr selfMacAddr;
- - tVOS_CON_MODE currDeviceMode;
- + tSirMacAddr selfMacAddr;
- + tVOS_CON_MODE currDeviceMode;
- tANI_U32 type;
- tANI_U32 subType;
- tANI_U8 sessionId;
- - tANI_U32 status;
- - tANI_U16 pkt_err_disconn_th;
- + tANI_U32 status;
- }tAddStaSelfParams, *tpAddStaSelfParams;
- #ifdef FEATURE_WLAN_TDLS
- diff --git a/drivers/staging/qcacld-2.0/Kbuild b/drivers/staging/qcacld-2.0/Kbuild
- index a6337dd..1b70a30 100644
- --- a/drivers/staging/qcacld-2.0/Kbuild
- +++ b/drivers/staging/qcacld-2.0/Kbuild
- @@ -223,7 +223,7 @@ CONFIG_QCA_SINGLE_BINARY_SUPPORT := 0
- CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC := 1
- #Flag to enable/disable secure firmware feature
- -CONFIG_FEATURE_SECURE_FIRMWARE := 0
- +CONFIG_FEATURE_SECURE_FIRMWARE := 1
- #Flag to enable Stats Ext implementation
- CONFIG_FEATURE_STATS_EXT := 1
- @@ -239,6 +239,12 @@ HAVE_CFG80211 := 0
- endif
- endif
- +ifeq ($(BOARD_PLATFORM),msm8994)
- +CONFIG_MSM8994 := 1
- +else
- +CONFIG_MSM8994 := 0
- +endif
- +
- ############ COMMON ############
- COMMON_DIR := CORE/SERVICES/COMMON
- COMMON_INC := -I$(WLAN_ROOT)/$(COMMON_DIR)
- @@ -1037,6 +1043,8 @@ endif
- # enable the MAC Address auto-generation feature
- CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
- +CDEFINES += -DMOTO_UTAGS_MAC
- +
- ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
- CDEFINES += -DWLAN_FEATURE_11W
- endif
- @@ -1120,7 +1128,7 @@ CDEFINES += -DCONFIG_HL_SUPPORT
- endif
- #Enable FW logs through ini
- -CDEFINES += -DCONFIG_FW_LOGS_BASED_ON_INI
- +#CDEFINES += -DCONFIG_FW_LOGS_BASED_ON_INI
- #Enable pci read/write config functions
- ifeq ($(CONFIG_ATH_PCI), 1)
- @@ -1204,9 +1212,6 @@ ifeq ($(CONFIG_SMP),y)
- CDEFINES += -DQCA_CONFIG_SMP
- endif
- -#Enable Channel Matrix restriction for all targets
- -CDEFINES += -DWLAN_ENABLE_CHNL_MATRIX_RESTRICTION
- -
- #features specific to mdm9630
- ifeq ($(CONFIG_ARCH_MDM9630), y)
- @@ -1265,6 +1270,10 @@ ifeq ($(CONFIG_FEATURE_SECURE_FIRMWARE), 1)
- CDEFINES += -DFEATURE_SECURE_FIRMWARE
- endif
- +ifeq ($(CONFIG_MSM8994), 1)
- +CDEFINES += -DCONFIG_MSM8994
- +endif
- +
- #Enable/disable FW hash check for secure firmware feature
- ifeq ($(CONFIG_CLD_DEBUG), y)
- CDEFINES += -DFEATURE_FW_HASH_CHECK
- @@ -1273,7 +1282,7 @@ endif
- ifeq ($(CONFIG_ATH_PCIE_ACCESS_DEBUG), 1)
- CDEFINES += -DCONFIG_ATH_PCIE_ACCESS_DEBUG
- endif
- -
- +CDEFINES += -DCONFIG_FW_LOGS_BASED_ON_INI
- #Flag to enable/disable WLAN D0-WOW
- ifeq ($(CONFIG_PCI_MSM), y)
- CDEFINES += -DFEATURE_WLAN_D0WOW
- @@ -1295,6 +1304,10 @@ ifeq ($(CONFIG_LINUX_QCMBR),y)
- CDEFINES += -DLINUX_QCMBR
- endif
- +ifneq ($(CNSS_LOCALE),)
- +CDEFINES += -DCNSS_LOCALE_$(CNSS_LOCALE)
- +endif
- +
- KBUILD_CPPFLAGS += $(CDEFINES)
- # Currently, for versions of gcc which support it, the kernel Makefile
- diff --git a/drivers/staging/qcacld-2.0/Kconfig b/drivers/staging/qcacld-2.0/Kconfig
- index 523e444..00ecc75 100644
- --- a/drivers/staging/qcacld-2.0/Kconfig
- +++ b/drivers/staging/qcacld-2.0/Kconfig
- @@ -1,13 +1,29 @@
- -comment "Qualcomm Atheros CLD WLAN module"
- +comment "Qualcomm Atheros Prima WLAN module"
- -config QCA_CLD_WLAN
- +config PRIMA_WLAN
- - tristate "Qualcomm Atheros CLD WLAN module"
- + tristate "Qualcomm Atheros Prima WLAN module"
- default n
- help
- - Add support for the Qualcomm Atheros CLD WLAN module
- + Add support for the Qualcomm Atheros Prima WLAN module
- -if QCA_CLD_WLAN != n
- +config PRONTO_WLAN
- +
- + tristate "Qualcomm Atheros Pronto WLAN module"
- + default n
- + help
- + Add support for the Qualcomm Atheros Pronto WLAN module
- +
- +
- +# depends on WLAN
- +# depends on CFG80211
- +# depends on WCNSS_CORE
- +
- +if PRIMA_WLAN != n || PRONTO_WLAN != n
- +
- +config PRIMA_WLAN_BTAMP
- + bool "Enable the Prima WLAN BT-AMP feature"
- + default n
- config QCACLD_WLAN_LFR3
- bool "Enable the WLAN Legacy Fast Roaming feature Version 3"
- @@ -33,16 +49,8 @@ config QCOM_VOWIFI_11R
- bool "Enable Fast Transition (11r) feature"
- default n
- -config FEATURE_NAN
- +config CONFIG_FEATURE_NAN
- bool "Enable NAN feature"
- default n
- -config QCOM_TDLS
- - bool "Enable TDLS feature"
- - default n
- -
- -config QCOM_LTE_COEX
- - bool "Enable QCOM LTE Coex feature"
- - default n
- -
- -endif # QCA_CLD_WLAN
- +endif # PRIMA_WLAN || PRONTO_WLAN
- diff --git a/drivers/staging/qcacld-2.0/firmware_bin/WCNSS_qcom_cfg.ini b/drivers/staging/qcacld-2.0/firmware_bin/WCNSS_qcom_cfg.ini
- index 2316ca7..aa98da0 100755
- --- a/drivers/staging/qcacld-2.0/firmware_bin/WCNSS_qcom_cfg.ini
- +++ b/drivers/staging/qcacld-2.0/firmware_bin/WCNSS_qcom_cfg.ini
- @@ -10,7 +10,6 @@ gEnableImps=1
- gEnableIdleScan=0
- -
- # Increase sleep duration (seconds) during IMPS
- # 0 implies no periodic wake up from IMPS. Periodic wakeup is
- # unnecessary if Idle Scan is disabled.
- @@ -163,9 +162,6 @@ g11dSupportEnabled=0
- g11hSupportEnabled=1
- -# DFS Master Capability
- -gEnableDFSMasterCap=1
- -
- # ESE Support and fast transition
- EseEnabled=1
- ImplicitQosIsEnabled=0
- @@ -397,8 +393,8 @@ gSetRxChainmask1x1=1
- # Scan Timing Parameters
- # gPassiveMaxChannelTime=110
- # gPassiveMinChannelTime=60
- -gActiveMaxChannelTime=80
- -gActiveMinChannelTime=40
- +gActiveMaxChannelTime=40
- +gActiveMinChannelTime=20
- #If set to 0, MCC is not allowed.
- gEnableMCCMode=1
- @@ -416,7 +412,7 @@ gEnableTXSTBC=1
- gEnableRXLDPC=1
- #Enable/Disable Tx beamforming
- -gTxBFEnable=1
- +gTxBFEnable=0
- # Enable Tx beamforming in VHT20MHz
- # Valid values are 0,1. If commented out, the default value is 0.
- @@ -429,10 +425,10 @@ gEnableActiveModeOffload=1
- #Enable Scan Results Aging based on timer
- #Timer value is in seconds
- #If Set to 0 it will not enable the feature
- -gScanAgingTime=0
- +gScanAgingTime=22
- #Enable Scan Results Aging based on number of scans
- -gScanResultAgeCount=1
- +gScanResultAgeCount=2
- #Enable Power saving mechanism Based on Android Framework
- #If set to 0 Driver internally control the Power saving mechanism
- @@ -468,7 +464,10 @@ gFlexConnectPowerFactor=0
- gNumChanCombinedConc=60
- #Enable Power Save offload
- -gEnablePowerSaveOffload=2
- +# 0 disabled
- +# 1 enable the offload in the fw.
- +# 2 enable the offload in the fw + qpower
- +gEnablePowerSaveOffload=1
- #Enable firmware uart print
- gEnablefwprint=0
- @@ -521,7 +520,7 @@ TxPower5g=10
- gEnableOverLapCh=0
- #Enable VHT on 2.4Ghz
- -gEnableVhtFor24GHzBand=1
- +gEnableVhtFor24GHzBand=0
- #Enable or Disable 5G early beacon termination
- gEnable5gEBT=1
- @@ -546,6 +545,8 @@ gEnableMemDeepSleep=1
- gEnableStrictRegulatoryForFCC=0
- #Disable packet log feature
- +# 0 to disable
- +# 1 to enable
- gEnablePacketLog=0
- # Bus bandwidth threshold values in terms of number of packets
- @@ -574,7 +575,8 @@ gEnableGreenAp=1
- # Radar PRI multiplier
- gDFSradarMappingPriMultiplier=4
- -gPNOScanSupport=0
- +# Enable PNO scaning
- +gPNOScanSupport=1
- # Enable/Disable RX full reorder offload
- gReorderOffloadSupported=1
- @@ -591,7 +593,7 @@ gEnableSifsBurst=1
- # Enable or Disable Multi-user MIMO
- # 1=Enable (default), 0=Disable
- -gEnableMuBformee=1
- +gEnableMuBformee=0
- # Enable/Disable channel avoidance for SAP in SCC scenario
- # 0 - disable
- @@ -635,13 +637,26 @@ gTDLSExternalControl=1
- # 1 - enable
- # TDLS off-channel operation will be invoked when there is only one
- # TDLS connection.
- -gEnableTDLSOffChannel=1
- +gEnableTDLSOffChannel=0
- +
- +gEnableTDLSScan=1
- +gTDLSTxStatsPeriod=500
- +gTDLSTxPacketThreshold=10
- +gTDLSIdlePacketThreshold=5
- gEnableSelfRecovery=1
- +# Extra driver logging, for data stall
- +#gFwDebugLogType=3
- +#gFwDebugLogLevel=4
- +#gFwDebugModuleLoglevel=1,0,2,0,4,0,5,0,6,0,8,0,9,0,11,0,13,0,17,0,18,0,19,0,27,0,29,0,31,0,35,0,36,0,38,0
- +
- # Enable or Disable Random MAC (Spoofing)
- # 1=Enable, 0=Disable (default)
- -gEnableMacAddrSpoof=0
- +gEnableMacAddrSpoof=1
- +
- +# DTIM setting
- +gEnableDynamicDTIM=3
- # Enable to check FW hash if secure FW feature is enabled. It's for defconfig
- # builds only since it will be ignored in performance/release builds.
- diff --git a/drivers/staging/qcacld-2.0/tools/fwdebuglog/Android.mk b/drivers/staging/qcacld-2.0/tools/fwdebuglog/Android.mk
- index ff8560d..a035245 100644
- --- a/drivers/staging/qcacld-2.0/tools/fwdebuglog/Android.mk
- +++ b/drivers/staging/qcacld-2.0/tools/fwdebuglog/Android.mk
- @@ -13,8 +13,9 @@ LOCAL_MODULE_TAGS := optional
- LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/diag/include \
- LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc \
- LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../../wlan/utils/asf/inc \
- -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../CORE/SERVICES/COMMON
- -LOCAL_SHARED_LIBRARIES := libc libcutils libdiag libhardware_legacy
- +LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../CORE/SERVICES/COMMON \
- +LOCAL_C_INCLUDES += external/zlib
- +LOCAL_SHARED_LIBRARIES := libc libcutils libdiag libhardware_legacy liblog libz
- LOCAL_SRC_FILES := cld-fwlog-netlink.c parser.c nan-parser.c cld-diag-parser.c
- LOCAL_CFLAGS += -DCONFIG_ANDROID_LOG
- LOCAL_CFLAGS += -DANDROID
- @@ -27,8 +28,9 @@ LOCAL_MODULE_TAGS := optional
- LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/diag/include \
- LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/common/inc \
- LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../../wlan/utils/asf/inc \
- -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../CORE/SERVICES/COMMON
- -LOCAL_SHARED_LIBRARIES := libc libcutils libdiag libhardware_legacy
- +LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../CORE/SERVICES/COMMON \
- +LOCAL_C_INCLUDES += external/zlib
- +LOCAL_SHARED_LIBRARIES := libc libcutils libdiag libhardware_legacy liblog libz
- LOCAL_SRC_FILES := cld-fwlog-netlink.c parser.c nan-parser.c cld-diag-parser.c
- LOCAL_CFLAGS += -DCONFIG_ANDROID_LOG
- LOCAL_CFLAGS += -DANDROID
- @@ -40,6 +42,6 @@ include $(CLEAR_VARS)
- LOCAL_MODULE := cld-fwlog-parser
- LOCAL_MODULE_TAGS := optional
- LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../CORE/SERVICES/COMMON
- -LOCAL_SHARED_LIBRARIES := libc libcutils
- +LOCAL_SHARED_LIBRARIES := libc libcutils liblog
- LOCAL_SRC_FILES := cld-fwlog-parser.c
- include $(BUILD_EXECUTABLE)
- diff --git a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.c b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.c
- index 944293b..2d581d5 100644
- --- a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.c
- +++ b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.c
- @@ -35,6 +35,14 @@
- #include <sys/socket.h>
- #include <linux/netlink.h>
- #include "cld-diag-parser.h"
- +#ifdef CONFIG_ANDROID_LOG
- +#include <android/log.h>
- +
- +#define FWDEBUG_LOG_NAME "ROME"
- +#define FWDEBUG_NAME "ROME_DEBUG"
- +#define android_printf(...) \
- + __android_log_print(ANDROID_LOG_INFO, FWDEBUG_LOG_NAME, __VA_ARGS__);
- +#endif
- typedef struct diag_entry{
- uint32_t id;
- @@ -744,9 +752,6 @@ cnssdiag_register_kernel_logging(int sock_fd, struct nlmsghdr *nlh)
- wnl->wmsg.length = sizeof(tAniHdr);
- wnl->wmsg.type = ANI_NL_MSG_LOG_REG_TYPE;
- if (sendto(sock_fd, (char*)wnl, nlh->nlmsg_len,0,NULL, 0) < 0) {
- - debug_printf("%s: HOST_MSG:Failed to send message over NL"
- - " errno:%d - %s\n",
- - __func__, errno, strerror(errno));
- return -1;
- }
- @@ -763,9 +768,6 @@ cnssdiag_register_kernel_logging(int sock_fd, struct nlmsghdr *nlh)
- regReq = (tAniNlAppRegReq *)(wnl + 1);
- regReq->pid = getpid();
- if (sendto(sock_fd, (char*)wnl, nlh->nlmsg_len,0,NULL, 0) < 0) {
- - debug_printf("%s: EVENT_LOG:Failed to send message over NL"
- - " errno:%d - %s\n",
- - __func__, errno, strerror(errno));
- return -1;
- }
- return 0;
- @@ -829,15 +831,22 @@ sendcnss_cmd(int sock_fd, int32_t cmd, int len, uint8_t *buf)
- void
- -diag_initialize(int sock_fd, uint32_t optionflag)
- +diag_initialize(boolean isDriverLoaded, int sock_fd, uint32_t optionflag)
- {
- - uint32_t ret;
- - goptionflag = optionflag;
- - diag_free_db();
- - ret = parse_dbfile();
- - if (ret > 1)
- - gisdiag_init = TRUE;
- - gdiag_sock_fd = sock_fd;
- + if (isDriverLoaded) {
- + if (!gisdiag_init) {
- + uint32_t ret;
- + goptionflag = optionflag;
- + diag_free_db();
- + ret = parse_dbfile();
- + if (ret > 1)
- + gisdiag_init = TRUE;
- + gdiag_sock_fd = sock_fd;
- + }
- + } else {
- + gdiag_sock_fd = 0;
- + gisdiag_init = FALSE;
- + }
- }
- void
- @@ -906,7 +915,7 @@ process_diagfw_msg(uint8_t *datap, uint16_t len, uint32_t optionflag,
- * then turn on event not received hence
- * before throwing out error initialize again
- */
- - diag_initialize(sock_fd, optionflag);
- + diag_initialize(1, sock_fd, optionflag);
- if (!gisdiag_init) {
- diag_printf("**ERROR** Diag not Initialized",
- 0, 4, optionflag, 0, NULL);
- @@ -1022,15 +1031,10 @@ process_diagfw_msg(uint8_t *datap, uint16_t len, uint32_t optionflag,
- lrecord++;
- if (!((optionflag & SILENT_FLAG) == SILENT_FLAG))
- printf("%d: %s\n", lrecord, buf);
- -
- res = diag_printf(
- buf, vdevid, vdevlevel, optionflag, timestamp, log_out
- );
- //fseek(log_out, lrecord * res, SEEK_SET);
- - if (lrecord == max_records) {
- - lrecord = 0;
- - fseek(log_out, lrecord * res, SEEK_SET);
- - }
- *record = lrecord;
- }
- if (optionflag & (CONSOLE_FLAG | QXDM_FLAG))
- @@ -1168,10 +1172,6 @@ void process_cnss_host_message(tAniNlHdr *wnl, int32_t optionflag,
- if (!((optionflag & SILENT_FLAG) == SILENT_FLAG))
- printf("%d: %s\n", lrecord, wlanLog);
- res = fprintf(log_out, "%s\n", wlanLog);
- - if (lrecord == max_records) {
- - lrecord = 0;
- - fseek(log_out, lrecord * res, SEEK_SET);
- - }
- *record = lrecord;
- }
- else if (optionflag & CONSOLE_FLAG) {
- diff --git a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.h b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.h
- index 533b033..3409ad4 100644
- --- a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.h
- +++ b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-diag-parser.h
- @@ -135,7 +135,6 @@
- #define SILENT_FLAG 0x08
- #define DEBUG_FLAG 0x10
- -#define INIT_WITH_SLEEP 10
- #define ATH6KL_FWLOG_PAYLOAD_SIZE 1500
- #define HDRLEN 16
- @@ -273,17 +272,6 @@ static inline unsigned int aniNlLen(unsigned int len)
- /* KERNEL DEFS END */
- -#ifdef CONFIG_ANDROID_LOG
- -#include <android/log.h>
- -
- -#define FWDEBUG_LOG_NAME "ROME"
- -#define FWDEBUG_NAME "ROME_DEBUG"
- -#define android_printf(...) \
- - __android_log_print(ANDROID_LOG_INFO, FWDEBUG_LOG_NAME, __VA_ARGS__);
- -#else
- -#define android_printf printf
- -#endif
- -
- #define WLAN_NL_MSG_CNSS_DIAG 27 /* Msg type between user space/wlan driver */
- #define WLAN_NL_MSG_CNSS_HOST_MSG 28
- #define WLAN_NL_MSG_CNSS_HOST_EVENT_LOG 17
- @@ -298,10 +286,8 @@ static inline unsigned int aniNlLen(unsigned int len)
- #define MAX_MSG_SIZE 50000
- #define DIAG_MSG_MAX_LEN 4096
- #define DIAG_MSG_OVERHEAD_LEN 48
- -/* PKT SIZE for intf */
- -#define MAX_PKT_SIZE 8192
- -/* SPECIAL DIAG HANDLING */
- +/* SPECIAL DIAG HANDLING*/
- #define DIAG_WLAN_MODULE_STA_PWRSAVE 34292
- #define DIAG_WLAN_MODULE_WAL 42996
- #define DIAG_NAN_MODULE_ID 56820
- @@ -339,7 +325,7 @@ int32_t
- dbglog_parse_debug_logs(u_int8_t *datap, u_int16_t len, u_int16_t dropped);
- void
- -diag_initialize(int sock_fd, uint32_t optionflag);
- +diag_initialize(boolean isDriverLoaded, int sock_fd, uint32_t optionflag);
- void
- process_diaghost_msg(uint8_t *datap, uint16_t len);
- diff --git a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-fwlog-netlink.c b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-fwlog-netlink.c
- index 31c88ba..f006322 100644
- --- a/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-fwlog-netlink.c
- +++ b/drivers/staging/qcacld-2.0/tools/fwdebuglog/cld-fwlog-netlink.c
- @@ -40,7 +40,6 @@
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/capability.h>
- -#include <sys/prctl.h>
- #include <linux/prctl.h>
- #include <pwd.h>
- #ifdef ANDROID
- @@ -48,19 +47,19 @@
- #endif
- #include <sys/socket.h>
- #include <linux/netlink.h>
- -#include <linux/rtnetlink.h>
- -#include <net/if.h>
- #include "event.h"
- #include "msg.h"
- #include "log.h"
- -
- #include "diag_lsm.h"
- #include "diagpkt.h"
- #include "diagcmd.h"
- #include "diag.h"
- #include "cld-diag-parser.h"
- -
- -#define CNSS_INTF "wlan0"
- +//Begin IKSWL-8571:LAN Firmware and driver logs
- +#include "zlib.h"
- +#include <stdbool.h>
- +#include <dirent.h>
- +//End IKSWL-8571
- #ifdef ANDROID
- /* CAPs needed
- @@ -76,6 +75,14 @@ const uint32_t capabilities = (1 << CAP_NET_RAW) | (1 << CAP_NET_ADMIN);
- * AID_WIFI : WIFI Operation
- */
- const gid_t groups[] = {AID_INET, AID_NET_ADMIN, AID_QCOM_DIAG, AID_WIFI};
- +
- +//Begin IKSWL-8571:LAN Firmware and driver logs
- +char logFilePath[PATH_MAX];
- +char parentDir[] = "/data/misc/wifi";
- +const char logDir[] ="logs";
- +#define MAX_FILES 20
- +//End IKSWL-8571
- +
- #endif
- const char options[] =
- @@ -97,17 +104,26 @@ struct msghdr msg;
- static FILE *fwlog_res;
- FILE *log_out = NULL;
- const char *fwlog_res_file;
- -static int cnss_sock = -1;
- int32_t max_records;
- int32_t record = 0;
- const char *progname;
- -char dbglogoutfile[PATH_MAX];
- +char dbglogoutfile[PATH_MAX]={0}; //IKSWL-8571
- int32_t optionflag = 0;
- -int32_t rec_limit = 100000000; /* Million records is a good default */
- boolean isDriverLoaded = FALSE;
- +const char driverLoaded[] = "KNLREADY";
- +const char driverUnLoaded[] = "KNLCLOSE";
- -static void
- -usage(void)
- +int32_t rec_limit = 100000000; /* Million records is a good default */
- +
- +//Begin IKSWL-8571:LAN Firmware and driver logs
- +void createLogFileName(char * filenme,int len);
- +void handleLogFileMaxSizeLimit ();
- +void compressFile(const char* fromFileName);
- +void processFileClose();
- +//END IKSWL-8571
- +int changeOwnerMod(const char * fileName);
- +
- +static void usage(void)
- {
- fprintf(stderr, "Usage:\n%s options\n", progname);
- fprintf(stderr, "%s\n", options);
- @@ -219,7 +235,7 @@ cnssdiagservice_cap_handle(void)
- /* Set the capabilities */
- if (capset(cap_header, cap_data) < 0)
- {
- - printf("%d failed capset error:%s", __LINE__, strerror(errno));
- + ALOGE("%d failed capset error:%s", __LINE__, strerror(errno)); //IKSWL-8571
- return -1;
- }
- return 0;
- @@ -246,7 +262,7 @@ static void cleanup(void) {
- static void stop(int32_t signum)
- {
- - signum; /* Avoid warning */
- +
- if(optionflag & LOGFILE_FLAG){
- printf("Recording stopped\n");
- cleanup();
- @@ -273,12 +289,16 @@ void process_cnss_log_file(uint8_t *dbgbuf)
- record, timestamp, length, dropped);
- }
- if ((res = fwrite(dbgbuf, RECLEN, 1, log_out)) != 1){
- - perror("fwrite");
- + ALOGE("fwrite error to write to logfile");
- return;
- }
- fflush(log_out);
- - if (record == max_records)
- + //Begin IKSWL-8571:LAN Firmware and driver logs
- + if (record > max_records){
- + handleLogFileMaxSizeLimit();
- record = 0;
- + }
- + //End IKSWL-8571
- }
- /*
- * Process FW debug, FW event and FW log messages
- @@ -305,7 +325,11 @@ void process_cnss_diag_msg(tAniNlHdr *wnl)
- if (wnl->nlh.nlmsg_type == WLAN_NL_MSG_CNSS_HOST_MSG
- && (wnl->wmsg.type == ANI_NL_MSG_LOG_HOST_MSG_TYPE)) {
- - process_cnss_host_message(wnl, optionflag, log_out, &record, max_records);
- + process_cnss_host_message(wnl, optionflag, log_out, &record, max_records);
- + //Begin IKSWL-8571:LAN Firmware and driver logs
- + if (record > max_records)
- + handleLogFileMaxSizeLimit();
- + //End IKSWL-8571
- } else if (wnl->nlh.nlmsg_type == WLAN_NL_MSG_CNSS_HOST_EVENT_LOG
- && (wnl->wmsg.type == ANI_NL_MSG_LOG_HOST_EVENT_LOG_TYPE)) {
- process_cnss_host_diag_events_log((char *)((char *)&wnl->wmsg.length
- @@ -338,6 +362,10 @@ void process_cnss_diag_msg(tAniNlHdr *wnl)
- version = get_le32((uint8_t *)&slot->dropped);
- process_diagfw_msg(&slot->payload[0], length, optionflag, log_out,
- &record, max_records, version, sock_fd);
- + //Begin IKSWL-8571:LAN Firmware and driver logs
- + if (record > max_records)
- + handleLogFileMaxSizeLimit();
- + //End IKSWL-8571
- } else if (diag_type == DIAG_TYPE_HOST_MSG) {
- slot = (struct dbglog_slot *)dbgbuf;
- length = get_32((uint8_t *)&slot->length);
- @@ -379,7 +407,7 @@ static int32_t create_nl_socket()
- return sock_fd;
- }
- -static int initialize(int32_t sock_fd)
- +static uint32_t initialize(int32_t sock_fd)
- {
- char *mesg = "Hello";
- @@ -413,216 +441,17 @@ static int initialize(int32_t sock_fd)
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- - if (sendmsg(sock_fd, &msg, 0) < 0) {
- - android_printf("%s error ", __func__);
- - return -1;
- - }
- - return 1;
- -}
- -
- -static int
- -cnss_read_ifname(struct nlmsghdr *h, size_t len)
- -{
- - struct ifinfomsg *ifi;
- - int attrlen, nlmsg_len, rta_len;
- - struct rtattr *attr;
- -
- - if (!h) {
- - android_printf("%s null error ", __func__);
- - return 0;
- - }
- -
- - if (len < sizeof(*ifi)) {
- - android_printf("%s len error ", __func__);
- - return 0;
- - }
- -
- - ifi = NLMSG_DATA(h);
- -
- - nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg));
- -
- - attrlen = h->nlmsg_len - nlmsg_len;
- - if (attrlen < 0)
- - return 0;
- -
- - attr = (struct rtattr *) (((char *) ifi) + nlmsg_len);
- -
- - rta_len = RTA_ALIGN(sizeof(struct rtattr));
- - while (RTA_OK(attr, attrlen)) {
- - char ifname[IFNAMSIZ + 1];
- -
- - if (attr->rta_type == IFLA_IFNAME) {
- - int n = attr->rta_len - rta_len;
- - if (n < 0)
- - break;
- -
- - memset(ifname, 0, sizeof(ifname));
- -
- - if ((size_t) n > sizeof(ifname))
- - n = sizeof(ifname);
- - memcpy(ifname, ((char *) attr) + rta_len, n);
- - if (strcmp(ifname, CNSS_INTF) == 0)
- - return 1;
- - else
- - return 0;
- - }
- -
- - attr = RTA_NEXT(attr, attrlen);
- - }
- + sendmsg(sock_fd, &msg, 0);
- return 0;
- }
- -static int cnss_intf_receive(int sock)
- -{
- - char buf[MAX_PKT_SIZE];
- - int left, sleep_cnt = 0;
- - struct sockaddr_nl from;
- - socklen_t fromlen;
- - struct nlmsghdr *h;
- -
- - fromlen = sizeof(from);
- - while ( 1 ) {
- - left = recvfrom(sock, buf, sizeof(buf), MSG_DONTWAIT,
- - (struct sockaddr *) &from, &fromlen);
- - if (left < 0) {
- - return -1;
- - }
- -
- - h = (struct nlmsghdr *) buf;
- - while (left >= (int) sizeof(*h)) {
- - int len, plen;
- -
- - len = h->nlmsg_len;
- - plen = len - sizeof(*h);
- - if (len > left || plen < 0) {
- - break;
- - }
- -
- - switch (h->nlmsg_type) {
- - case RTM_NEWLINK:
- - if (cnss_read_ifname(h, plen)) {
- - if (!isDriverLoaded) {
- - isDriverLoaded = TRUE;
- - sleep_cnt = 0;
- - while ( 1 ) {
- - if (initialize(sock_fd) < 0) {
- - android_printf("%s error retrying",
- - __func__);
- - sleep_cnt++;
- - sleep(1);
- - /* DONT LOOP EVER */
- - if (sleep_cnt >= INIT_WITH_SLEEP)
- - break;
- - else
- - continue;
- - }
- - diag_initialize(sock_fd, optionflag);
- - cnssdiag_register_kernel_logging(sock_fd, nlh);
- - break;
- - }
- - }
- -
- - }
- - break;
- - case RTM_DELLINK:
- - if (cnss_read_ifname(h, plen)) {
- - isDriverLoaded = FALSE;
- - }
- - break;
- - }
- -
- - len = NLMSG_ALIGN(len);
- - left -= len;
- - h = (struct nlmsghdr *) ((char *) h + len);
- - }
- - }
- - return 0;
- -}
- -
- -static int cnss_intf_init()
- -{
- - struct sockaddr_nl local;
- - cnss_sock = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
- - if (cnss_sock < 0) {
- - return -1;
- - }
- -
- - memset(&local, 0, sizeof(local));
- - local.nl_family = AF_NETLINK;
- - local.nl_groups = RTMGRP_LINK;
- - if (bind(cnss_sock, (struct sockaddr *) &local, sizeof(local)) < 0) {
- - close(cnss_sock);
- - return -1;
- - }
- - return 1;
- -}
- -
- -static inline void* cnss_intf_wait_receive(void * arg)
- -{
- - arg; /* Avoid warning */
- - fd_set fds;
- - int oldfd, ret;
- - int sock;
- -
- - cnss_intf_init();
- - sock = cnss_sock;
- -
- - if (sock < 0) {
- - android_printf("%s error Netlink Socket Not Available", __func__);
- - return NULL;
- - }
- - while ( 1 ) {
- - /* Initialize fds */
- - FD_ZERO(&fds);
- - FD_SET(sock, &fds);
- - oldfd = sock;
- -
- - /* Wait for some trigger event */
- - ret = select(oldfd + 1, &fds, NULL, NULL, NULL);
- -
- - if (ret < 0) {
- - /* Error Occurred */
- - android_printf("%s error Netlink select fail", __func__);
- - return NULL;
- - } else if (!ret) {
- - android_printf("%s error Select on Netlink Socket Timed Out",
- - __func__);
- - /* Timeout Occurred */
- - return NULL;
- - }
- -
- - /* Check if any event is available for us */
- - if (FD_ISSET(sock, &fds)) {
- - cnss_intf_receive(sock);
- - }
- - }
- - return NULL;
- -}
- -
- -static inline boolean is_interface(const char *interface, int len)
- -{
- - struct ifreq ifr;
- - int sock = socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP);
- - memset(&ifr, 0, sizeof(ifr));
- - if (interface) {
- - strlcpy(ifr.ifr_name, interface, len);
- - }
- - if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
- - return FALSE;
- - }
- - close(sock);
- - return TRUE;
- -}
- -
- int32_t main(int32_t argc, char *argv[])
- {
- - int res =0;
- + uint32_t res =0;
- uint8_t *eventbuf = NULL;
- uint8_t *dbgbuf = NULL;
- int32_t c;
- struct dbglog_slot *slot;
- - int cnss_intf_len = strlen(CNSS_INTF) + 1;
- - pthread_t thd_id;
- progname = argv[0];
- uint16_t diag_type = 0;
- @@ -671,12 +500,29 @@ int32_t main(int32_t argc, char *argv[])
- usage();
- }
- }
- -
- + //Begin IKSWL-8571:LAN Firmware and driver logs
- if (!(optionflag & (LOGFILE_FLAG | CONSOLE_FLAG | QXDM_FLAG | SILENT_FLAG
- - | DEBUG_FLAG))) {
- - usage();
- - return -1;
- + | DEBUG_FLAG))) {
- + optionflag |= LOGFILE_FLAG;
- + if(cnssdiagservice_cap_handle()) {
- + printf("Cap bouncing failed EXIT!!!");
- + }
- + memset(logFilePath, 0,sizeof(logFilePath));
- + snprintf(logFilePath,sizeof(logFilePath)-1, "%s/%s", parentDir, logDir);
- + res = mkdir(logFilePath, S_IRWXU | S_IRWXG);
- + if ( ( res != 0 ) && ( errno != EEXIST ) )
- + {
- + ALOGE(" Could not create parent dir errno=%d\n",errno);
- + }
- + res = 0;
- + changeOwnerMod(logFilePath);
- + // process the file that was not zipped at last poweroff
- + processFileClose();
- + createLogFileName(dbglogoutfile,PATH_MAX);
- + optionflag |= LOGFILE_FLAG;
- +
- }
- + //End IKSWL-8571
- if (optionflag & QXDM_FLAG) {
- /* Intialize the fd required for diag APIs */
- @@ -695,18 +541,14 @@ int32_t main(int32_t argc, char *argv[])
- #endif
- }
- - pthread_create(&thd_id, NULL, &cnss_intf_wait_receive, NULL);
- -
- sock_fd = create_nl_socket();
- if (sock_fd < 0) {
- fprintf(stderr, "Socket creation failed sock_fd 0x%x \n", sock_fd);
- return -1;
- }
- - if (is_interface(CNSS_INTF, cnss_intf_len)) {
- - initialize(sock_fd);
- - cnssdiag_register_kernel_logging(sock_fd, nlh);
- - }
- + initialize(sock_fd);
- + cnssdiag_register_kernel_logging(sock_fd, nlh);
- signal(SIGINT, stop);
- signal(SIGTERM, stop);
- @@ -720,12 +562,22 @@ int32_t main(int32_t argc, char *argv[])
- free(nlh);
- return -1;
- }
- - max_records = rec_limit;
- + max_records = rec_limit / RECLEN;
- printf("Storing last %d records\n", max_records);
- log_out = fopen(dbglogoutfile, "w");
- +
- if (log_out == NULL) {
- - perror("Failed to create output file");
- + ALOGE("Failed to create output file %s error=%s ",dbglogoutfile, strerror(errno));
- + close(sock_fd);
- + free(nlh);
- + return -1;
- + }
- + fclose(log_out);
- + changeOwnerMod(dbglogoutfile);
- + log_out = fopen(dbglogoutfile, "w");
- + if (log_out == NULL) {
- + ALOGE("Failed to open output file %s error=%s ",dbglogoutfile, strerror(errno));
- close(sock_fd);
- free(nlh);
- return -1;
- @@ -737,17 +589,44 @@ int32_t main(int32_t argc, char *argv[])
- parser_init();
- - while ( 1 ) {
- - if ((res = recvmsg(sock_fd, &msg, 0)) < 0)
- - continue;
- - if ((res >= (int)sizeof(struct dbglog_slot)) ||
- - (nlh->nlmsg_type == WLAN_NL_MSG_CNSS_HOST_EVENT_LOG)) {
- - process_cnss_diag_msg((tAniNlHdr *)nlh);
- - memset(nlh,0,NLMSG_SPACE(MAX_MSG_SIZE));
- - } else {
- - /* Ignore other messages that might be broadcast */
- - continue;
- - }
- + while ((res = recvmsg(sock_fd, &msg, 0)) > 0) {
- + if ((isDriverLoaded == FALSE) &&
- + (res == SIZEOF_NL_MSG_LOAD)) {
- + eventbuf = (uint8_t *)NLMSG_DATA(nlh);
- + if (0 == strncmp(driverLoaded, (const char *)eventbuf,
- + strlen(driverLoaded))) {
- + isDriverLoaded = TRUE;
- + close(sock_fd);
- + /* Wait for driver to Load */
- + sleep(10);
- + sock_fd = create_nl_socket();
- + if (sock_fd < 0) {
- + printf("create nl sock failed ret %d \n", sock_fd);
- + return -1;
- + }
- + initialize(sock_fd);
- + diag_initialize(isDriverLoaded, sock_fd, optionflag);
- + cnssdiag_register_kernel_logging(sock_fd, nlh);
- + }
- + } else if ((isDriverLoaded == TRUE) &&
- + (res == SIZEOF_NL_MSG_UNLOAD)) {
- + eventbuf = (uint8_t *)NLMSG_DATA(nlh);
- + if (0 == strncmp(driverUnLoaded, (const char *)eventbuf,
- + strlen(driverUnLoaded))) {
- + isDriverLoaded = FALSE;
- + diag_initialize(isDriverLoaded, sock_fd, optionflag);
- + }
- + } else if (((res >= sizeof(struct dbglog_slot)) &&
- + (res != SIZEOF_NL_MSG_LOAD) &&
- + (res != SIZEOF_NL_MSG_UNLOAD)) ||
- + (nlh->nlmsg_type == WLAN_NL_MSG_CNSS_HOST_EVENT_LOG)) {
- + isDriverLoaded = TRUE;
- + process_cnss_diag_msg((tAniNlHdr *)nlh);
- + memset(nlh,0,NLMSG_SPACE(MAX_MSG_SIZE));
- + } else {
- + /* Ignore other messages that might be broadcast */
- + continue;
- + }
- }
- /* Release the handle to Diag*/
- Diag_LSM_DeInit();
- @@ -757,3 +636,227 @@ int32_t main(int32_t argc, char *argv[])
- free(nlh);
- return 0;
- }
- +
- +//Begin IKSWL-8571:LAN Firmware and driver logs
- +void createLogFileName(char * filename,int len) {
- + struct timeval tv;
- + char timestamp_buf[30];
- + time_t curtime;
- + struct tm *tm_ptr = NULL;
- + memset(filename,0,len);
- + snprintf(filename,PATH_MAX,"%s/",logFilePath);
- + gettimeofday(&tv, NULL);
- + curtime=tv.tv_sec;
- + tm_ptr = localtime(&curtime);
- + if (tm_ptr)
- + strftime(timestamp_buf,30,"%Y%m%d_%H%M%S",tm_ptr);
- + else
- + strlcpy(timestamp_buf, "00000000_000000", 30);
- + snprintf( filename+(strlen(logFilePath)+1),len-(strlen(logFilePath)+1),"wlanLog_%s",timestamp_buf);
- + return ;
- +}
- +
- +void handleLogFileMaxSizeLimit () {
- + ALOGD("HandleLogFileMaxSizeLimit enter ");
- + fclose(log_out);
- + log_out = NULL;
- + record =0;
- + processFileClose();
- + createLogFileName(dbglogoutfile,PATH_MAX);
- + log_out = fopen(dbglogoutfile, "w");
- + if (log_out == NULL) {
- + ALOGE("Failed to create output file");
- + close(sock_fd);
- + free(nlh);
- + return;
- + }
- + fclose(log_out);
- + changeOwnerMod(dbglogoutfile);
- + log_out = fopen(dbglogoutfile, "w");
- + if (log_out == NULL) {
- + ALOGE("Failed to open output file %s error=%s ",dbglogoutfile, strerror(errno));
- + close(sock_fd);
- + free(nlh);
- + return;
- + }
- + return;
- +}
- +
- +void compressFile(const char* fromFileName) {
- + FILE* fromFile = NULL;
- + gzFile toFile = NULL;
- + static char buf[8192];
- + char toFilePath[PATH_MAX] ={};
- + char fromFilePath[PATH_MAX] ={};
- + bool isSuccess = false;
- + // Setup the source file.
- + snprintf(fromFilePath, sizeof(fromFilePath), "/%s", fromFileName);
- + fromFile = fopen(fromFilePath, "r");
- + if (NULL == fromFile) {
- + ALOGE("fopen(%s) failed; errno=%s", fromFilePath, strerror(errno));
- + goto cleanup;
- + }
- + // Setup the destination file.
- + snprintf(toFilePath, sizeof(toFilePath), "%s.gz",fromFileName);
- + toFile = gzopen(toFilePath, "w");
- + if (NULL == toFile) {
- + ALOGE("gzopen(%s) failed; errno=%s", toFilePath, strerror(errno));
- + goto cleanup;
- + }
- +
- + memset(buf, 0, sizeof(buf));
- + // Compress & copy.
- + while (!feof(fromFile)) {
- + size_t nBytesRead = fread(&buf[0], sizeof(char), sizeof(buf), fromFile);
- + if (ferror(fromFile)) {
- + if (EINTR == errno) {
- + clearerr(fromFile);
- + } else {
- + ALOGE("fread() failed; errno=%s", strerror(errno));
- + goto cleanup;
- + }
- + }
- + if (0 < nBytesRead) {
- + size_t nBytesWritten = gzwrite(toFile, &buf[0], nBytesRead);
- + if (0 == nBytesWritten) {
- + int gzErr;
- + const char* gzErrStr = gzerror(toFile, &gzErr);
- + if (Z_ERRNO == gzErr) {
- + if (EINTR == errno) {
- + gzclearerr(toFile);
- + } else {
- + ALOGE("gzwrite() failed; errno=%s", strerror(errno));
- + goto cleanup;
- + }
- + } else {
- + ALOGE("gzwrite() failed; gzerror=%s", gzErrStr ? gzErrStr : "(null)");
- + goto cleanup;
- + }
- + }
- + }
- + }
- + isSuccess = true;
- +cleanup:
- + if (fromFile)
- + fclose(fromFile);
- + if (toFile) {
- + gzclose(toFile);
- + changeOwnerMod(toFilePath);
- + }
- +
- + // Delete uncompressed file only if compress is success.
- + if (isSuccess)
- + unlink(fromFilePath);
- +
- + return;
- +}
- +
- +void processFileClose() {
- + struct dirent **eps;
- + char filePath[PATH_MAX] = {0};
- + int fileCount =0;
- + if (dbglogoutfile[0] != 0) {
- + compressFile(dbglogoutfile);
- + } else {
- + //This means we have just started logging service check and compress any uncompressed ones.
- + DIR *dp;
- + struct dirent *ep;
- + dp = opendir(logFilePath);
- + if (dp != NULL) {
- + //traverse through and find uncompressed files
- + while ((ep = readdir(dp)) != NULL){
- + if (ep->d_name[0] == '.'){
- + //donot consider . and .. files
- + continue;
- + }
- +
- + if (strstr(ep->d_name,".gz") == NULL) {
- + snprintf(filePath, sizeof(filePath),"%s/%s",logFilePath,ep->d_name);
- + compressFile(filePath);
- + }
- + }
- + }
- + }
- + //check and remove last modified log file
- + if ( (fileCount = scandir(logFilePath, &eps, 0, alphasort)) < 0) {
- + ALOGE("Scandir failed for %s errorno=%d\n",logFilePath,errno);
- + } else {
- + DIR *dp;
- + struct dirent *ep;
- + struct stat structstat;
- + char oldfile[30];
- + unsigned long modified=0;
- + static char cwd[1024]={};
- + int i = 0;
- +
- + // remember and change dir for stat and unlink
- + if (getcwd(cwd, sizeof(cwd)) == NULL) {
- + ALOGE(" getcwd failed errorno=%d\n",errno);
- + }
- + if (chdir(logFilePath)) {
- + ALOGE(" chdir failed errorno=%d\n",errno);
- + }
- +
- + for (i=0; i++; i<fileCount) {
- + free( eps[i]);
- + }
- + free(eps);
- +
- + //check and remove last modified log file
- + while (fileCount >= (MAX_FILES+4)) {
- + int j=0;
- + dp = opendir(logFilePath);
- + if (dp != NULL) {
- + modified =0;
- + //traverse through and find the oldest file in dir:w
- + while ((ep = readdir(dp)) != NULL){
- + if (ep->d_name[0] == '.'){
- + //donot consider . and .. files
- + continue;
- + }
- + if (stat(ep->d_name, &structstat) <0) {
- + }
- + if ( ! S_ISREG(structstat.st_mode)) {
- + continue;
- + }
- + if ( (modified > structstat.st_mtime) || modified==0) {
- + // copy file based on mofified file name
- + modified = structstat.st_mtime;
- + memset(oldfile,0,sizeof(oldfile));
- + snprintf(oldfile,sizeof(oldfile), "%s", ep->d_name);
- + }
- + }
- + if (closedir(dp))
- + ALOGE("Close dir failed errorno= %d\n",errno);
- + //remove the oldest file
- + if (unlink(oldfile)) {
- + ALOGE(" unlink failed for %s errno = %d\n",oldfile , errno);
- + } else {
- + fileCount--;
- + }
- + } else {
- + ALOGE("Unable to open logs dir...");
- + }
- + }
- + //restore pwd
- + if ((cwd == NULL) || chdir(cwd)) {
- + ALOGE(" chdir restore failed errorno=%d\n",errno);
- + }
- +
- + }
- +}
- +//End IKSWL-8571
- +
- +int changeOwnerMod(const char * filePath) {
- + int status = 0;
- + if (chown(filePath, AID_SYSTEM, AID_WIFI)){
- + ALOGE("Failed to change ownership of gz %s error=%s ",filePath, strerror(errno));
- + status = -1;
- + }
- + if (chmod(filePath, S_IRWXU | S_IRWXG)) {
- + ALOGE("Failed to change mode of gz %s error=%s ",filePath, strerror(errno));
- + if (!status)
- + status = -1;
- + }
- + return status;
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement