summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Kumaar Natarajan <kknatara@codeaurora.org>2016-09-02 12:28:07 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-09-10 19:05:38 -0700
commit6553ea16beb0c08fb4277ab1384d24f7ee3191fa (patch)
treee0cf71bbf2d890742c58c5f87994ba2015d46a95
parentb33a1b8392c2f7f99dca2fbe777c5d4351f174f8 (diff)
qcacld-3.0: Handle protected dual of public action frame
Handle protected dual of public action frame in lim_process_action_frame. GAS comeback request/response frames will be converted into protected dual of public action frame on encryption. These frames should be passed to userspace for further processing. Change-Id: I25e7f06369cdd238a561ddb5a825a63fe35f7b17 CRs-Fixed: 1063665 (cherry picked from commit 7745335fbdebcd81b274c703e5a080d61dd86428)
-rw-r--r--core/mac/inc/sir_mac_prot_def.h6
-rw-r--r--core/mac/src/pe/lim/lim_process_action_frame.c24
2 files changed, 30 insertions, 0 deletions
diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h
index 1389661ea45c..79657e25cdca 100644
--- a/core/mac/inc/sir_mac_prot_def.h
+++ b/core/mac/inc/sir_mac_prot_def.h
@@ -243,6 +243,12 @@
#define SIR_MAC_WNM_NOTIF_REQUEST 26
#define SIR_MAC_WNM_NOTIF_RESPONSE 27
+/* Protected Dual of Public Action(PDPA) frames Action field */
+#define SIR_MAC_PDPA_GAS_INIT_REQ 10
+#define SIR_MAC_PDPA_GAS_INIT_RSP 11
+#define SIR_MAC_PDPA_GAS_COMEBACK_REQ 12
+#define SIR_MAC_PDPA_GAS_COMEBACK_RSP 13
+
#define SIR_MAC_MAX_RANDOM_LENGTH 2306
/* ----------------------------------------------------------------------------- */
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index d1ba40d169ad..3eee93849812 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -2104,6 +2104,30 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx,
session, 0);
break;
}
+ case SIR_MAC_ACTION_PROT_DUAL_PUB:
+ lim_log(mac_ctx, LOG1,
+ FL("Rcvd Protected Dual of Public Action; action %d."),
+ action_hdr->actionID);
+ switch (action_hdr->actionID) {
+ case SIR_MAC_PDPA_GAS_INIT_REQ:
+ case SIR_MAC_PDPA_GAS_INIT_RSP:
+ case SIR_MAC_PDPA_GAS_COMEBACK_REQ:
+ case SIR_MAC_PDPA_GAS_COMEBACK_RSP:
+ mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
+ frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
+ rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
+ lim_send_sme_mgmt_frame_ind(mac_ctx,
+ mac_hdr->fc.subType, (uint8_t *) mac_hdr,
+ frame_len + sizeof(tSirMacMgmtHdr),
+ session->smeSessionId,
+ WMA_GET_RX_CH(rx_pkt_info), session, rssi);
+ break;
+ default:
+ lim_log(mac_ctx, LOG1,
+ FL("Unhandled - Protected Dual Public Action"));
+ break;
+ }
+ break;
default:
lim_log(mac_ctx, LOG1,
FL("Action category %d not handled"),