소스 검색

qcacmn: Add CDP API for HK DP to get security type from peer handler

Add CDP API for HK to get security type for ucast and mcast from
peer handler. Add additional peer handler argument for raw mode
rx decap functions. The peer handler is needed in the raw mode
functions for getting the security type of the frame and process
it accordingly.

Change-Id: I3c2688f33ca36a5bd2a747699d5acaab3ba14cfe
Chaitanya Kiran Godavarthi 8 년 전
부모
커밋
6228e3be66
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      dp/wifi3.0/dp_main.c

+ 15 - 0
dp/wifi3.0/dp_main.c

@@ -3108,6 +3108,20 @@ fail0:
 	return 0;
 }
 
+/*
+ * dp_get_sec_type() - Get the security type
+ * @peer:		Datapath peer handle
+ * @sec_idx:    Security id (mcast, ucast)
+ *
+ * return sec_type: Security type
+ */
+static int dp_get_sec_type(struct cdp_peer *peer, uint8_t sec_idx)
+{
+	struct dp_peer *dpeer = (struct dp_peer *)peer;
+
+	return dpeer->security[sec_idx].sec_type;
+}
+
 /*
  * dp_peer_authorize() - authorize txrx peer
  * @peer_handle:		Datapath peer handle
@@ -4827,6 +4841,7 @@ static struct cdp_ctrl_ops dp_ops_ctrl = {
 	.txrx_set_filter_neighbour_peers = dp_set_filter_neighbour_peers,
 	.txrx_update_filter_neighbour_peers =
 		dp_update_filter_neighbour_peers,
+	.txrx_get_sec_type = dp_get_sec_type,
 	/* TODO: Add other functions */
 	.txrx_wdi_event_sub = dp_wdi_event_sub,
 	.txrx_wdi_event_unsub = dp_wdi_event_unsub,