瀏覽代碼

qcacld-3.0: indicate tkip mic error to protocol layer

Currently tkip mic countermeasure is not supported for Napier. Fix is to
indicate tkip mic error indication to protocol layer so that errors can
be propogated to supplicant.

Change-Id: I8ee94343e76040e360f0887a826c07f98545f71f
CRs-Fixed: 2151984
jiad 7 年之前
父節點
當前提交
cd49ec74b5
共有 3 個文件被更改,包括 43 次插入1 次删除
  1. 2 1
      core/cds/src/cds_api.c
  2. 13 0
      core/wma/inc/wma.h
  3. 28 0
      core/wma/src/wma_data.c

+ 2 - 1
core/cds/src/cds_api.c

@@ -82,7 +82,8 @@ static struct ol_if_ops  dp_ol_if_ops = {
 	.peer_rx_reorder_queue_setup = wma_peer_rx_reorder_queue_setup,
 	.peer_rx_reorder_queue_remove = wma_peer_rx_reorder_queue_remove,
 	.is_hw_dbs_2x2_capable = policy_mgr_is_hw_dbs_2x2_capable,
-	.lro_hash_config = wma_lro_config_cmd
+	.lro_hash_config = wma_lro_config_cmd,
+	.rx_mic_error = wma_rx_mic_error_ind
     /* TODO: Add any other control path calls required to OL_IF/WMA layer */
 };
 

+ 13 - 0
core/wma/inc/wma.h

@@ -2220,6 +2220,19 @@ void
 wma_indicate_err(enum ol_rx_err_type err_type,
 	 struct ol_error_info *err_info);
 
+/**
+ * wma_rx_mic_error_ind() - indicate mic error to the protocol stack
+ * @scn_handle: pdev handle from osif layer
+ * @vdev_id: vdev id
+ * @wh: pointer to ieee80211_frame structure
+ *
+ * This function indicates TKIP MIC errors encountered in the RX data path
+ * to the protocol stack
+ *
+ * Return: none
+ */
+void wma_rx_mic_error_ind(void *scn_handle, uint16_t vdev_id, void *wh);
+
 QDF_STATUS wma_ht40_stop_obss_scan(tp_wma_handle wma_handle,
 				int32_t vdev_id);
 

+ 28 - 0
core/wma/src/wma_data.c

@@ -3121,3 +3121,31 @@ wma_indicate_err(
 	}
 	}
 }
+
+void wma_rx_mic_error_ind(void *scn_handle, uint16_t vdev_id, void *wh)
+{
+	struct ieee80211_frame *w = (struct ieee80211_frame *)wh;
+	struct ol_error_info err_info;
+
+	err_info.u.mic_err.vdev_id = vdev_id;
+	qdf_mem_copy(err_info.u.mic_err.da, w->i_addr1, OL_TXRX_MAC_ADDR_LEN);
+	qdf_mem_copy(err_info.u.mic_err.ta, w->i_addr2, OL_TXRX_MAC_ADDR_LEN);
+
+	WMA_LOGD("MIC vdev_id %d\n", vdev_id);
+	WMA_LOGD("MIC DA: %02x:%02x:%02x:%02x:%02x:%02x\n",
+						err_info.u.mic_err.da[0],
+						err_info.u.mic_err.da[1],
+						err_info.u.mic_err.da[2],
+						err_info.u.mic_err.da[3],
+						err_info.u.mic_err.da[4],
+						err_info.u.mic_err.da[5]);
+	WMA_LOGD("MIC TA: %02x:%02x:%02x:%02x:%02x:%02x\n",
+						err_info.u.mic_err.ta[0],
+						err_info.u.mic_err.ta[1],
+						err_info.u.mic_err.ta[2],
+						err_info.u.mic_err.ta[3],
+						err_info.u.mic_err.ta[4],
+						err_info.u.mic_err.ta[5]);
+
+	wma_indicate_err(OL_RX_ERR_TKIP_MIC, &err_info);
+}