Explorar el Código

qcacld-3.0: Fix check for identifying P2P action frame

Fix check for identifying P2P action frame by calling the helper
routine wlan_hdd_is_type_p2p_action().

Currently incoming frame buffer is checked against only for Public
action category and not for P2P OUI. Without this any Public action
frame could be incorrectly tagged as Provisionaly Discovery Request
or Go Negotiation Request.

Change-Id: Id55feec06072e2ca6ad780e51c49cd19662b4d8e
CRs-Fixed: 1071200
Krishna Kumaar Natarajan hace 8 años
padre
commit
9c323a8ceb
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3 4
      core/hdd/src/wlan_hdd_p2p.c

+ 3 - 4
core/hdd/src/wlan_hdd_p2p.c

@@ -1568,14 +1568,13 @@ send_frame:
 
 	if ((QDF_STA_MODE == pAdapter->device_mode) ||
 	    (QDF_P2P_CLIENT_MODE == pAdapter->device_mode) ||
-	    (QDF_P2P_DEVICE_MODE == pAdapter->device_mode)
-	    ) {
+	    (QDF_P2P_DEVICE_MODE == pAdapter->device_mode)) {
 		uint8_t sessionId = pAdapter->sessionId;
 
 		if ((type == SIR_MAC_MGMT_FRAME) &&
 		    (subType == SIR_MAC_MGMT_ACTION) &&
-		    (buf[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] ==
-		     WLAN_HDD_PUBLIC_ACTION_FRAME)) {
+		     wlan_hdd_is_type_p2p_action(&buf
+				[WLAN_HDD_PUBLIC_ACTION_FRAME_BODY_OFFSET])) {
 			actionFrmType =
 				buf[WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
 			hddLog(LOG1, "Tx Action Frame %u", actionFrmType);