瀏覽代碼

qcacld-3.0: Add CDP API to set key in data path

Add CDP API to set RX MIC key in datapath.
Required to perform RX demic of fragmented packets.

Change-Id: I3c05da62ff20f8551cdc5780ce2f7b8d23c73a37
CRs-Fixed: 2217884
psimha 7 年之前
父節點
當前提交
8696f772fe
共有 4 個文件被更改,包括 8 次插入2 次删除
  1. 2 1
      core/dp/txrx/ol_txrx.c
  2. 1 0
      core/wma/inc/wma.h
  3. 1 1
      core/wma/src/wma_dev_if.c
  4. 4 0
      core/wma/src/wma_mgmt.c

+ 2 - 1
core/dp/txrx/ol_txrx.c

@@ -2819,7 +2819,8 @@ static void ol_txrx_dump_peer_access_list(ol_txrx_peer_handle peer)
  * fails
  */
 static void *
-ol_txrx_peer_attach(struct cdp_vdev *pvdev, uint8_t *peer_mac_addr)
+ol_txrx_peer_attach(struct cdp_vdev *pvdev, uint8_t *peer_mac_addr,
+		    void *ol_peer)
 {
 	struct ol_txrx_vdev_t *vdev = (struct ol_txrx_vdev_t *)pvdev;
 	struct ol_txrx_peer_t *peer;

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

@@ -337,6 +337,7 @@ enum ds_mode {
 
 #define WMA_TXMIC_LEN 8
 #define WMA_RXMIC_LEN 8
+#define WMA_IV_KEY_LEN 16
 
 /*
  * Length = (2 octets for Index and CTWin/Opp PS) and

+ 1 - 1
core/wma/src/wma_dev_if.c

@@ -1732,7 +1732,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
 	 * where the HTT peer map event is received before the peer object
 	 * is created in the data path
 	 */
-	peer = cdp_peer_create(dp_soc, vdev, peer_addr);
+	peer = cdp_peer_create(dp_soc, vdev, peer_addr, NULL);
 	if (!peer) {
 		WMA_LOGE("%s : Unable to attach peer %pM", __func__, peer_addr);
 		wlan_objmgr_peer_obj_delete(obj_peer);

+ 4 - 0
core/wma/src/wma_mgmt.c

@@ -1965,6 +1965,10 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
 
 	/* Set PN check & security type in data path */
 	cdp_set_pn_check(soc, txrx_vdev, peer, sec_type, pn);
+	cdp_set_key(soc, peer, key_params->unicast,
+		    (uint32_t *)(key_params->key_data +
+				WMA_IV_KEY_LEN +
+				WMA_TXMIC_LEN));
 
 	status = wmi_unified_setup_install_key_cmd(wma_handle->wmi_handle,
 								&params);