Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e4c1702 authored by Vulupala Shashank Reddy's avatar Vulupala Shashank Reddy Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Forward all vendor specific action frames to supplicant

On reception of vendor specific action frames, host performs basic sanity
on vendor specific action frames fields and then forwards to supplicant.

Change-Id: Ib22b9a431411fff8128e461972b81b66688a0919
CRs-Fixed: 3262331
parent 7eb816e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -134,6 +135,7 @@
/* block acknowledgment action frame types */
#define SIR_MAC_ACTION_VENDOR_SPECIFIC 9
#define SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY     0x7F
#define SIR_MAC_PROT_ACTION_VENDOR_SPECIFIC_CATEGORY 0x7E
#define SIR_MAC_ACTION_P2P_SUBTYPE_PRESENCE_RSP     2

/* Public Action for 20/40 BSS Coexistence */
+10 −21
Original line number Diff line number Diff line
@@ -1606,7 +1606,6 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
	int8_t rssi;
	uint32_t frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
	tpSirMacVendorSpecificFrameHdr vendor_specific;
	uint8_t oui[] = { 0x00, 0x00, 0xf0 };
	uint8_t dpp_oui[] = { 0x50, 0x6F, 0x9A, 0x1A };
	tpSirMacVendorSpecificPublicActionFrameHdr pub_action;

@@ -1818,6 +1817,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
		break;

	case SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY:
	case SIR_MAC_PROT_ACTION_VENDOR_SPECIFIC_CATEGORY:
		vendor_specific = (tpSirMacVendorSpecificFrameHdr) action_hdr;
		mac_hdr = NULL;

@@ -1829,12 +1829,9 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
			return;
		}

		/* Check if it is a vendor specific action frame. */
		if (LIM_IS_STA_ROLE(session) &&
		    (!qdf_mem_cmp(session->self_mac_addr,
					&mac_hdr->da[0], sizeof(tSirMacAddr)))
		    && IS_WES_MODE_ENABLED(mac_ctx)
		    && !qdf_mem_cmp(vendor_specific->Oui, oui, 3)) {
		/* Forward all vendor specific action frames. */
		if (!qdf_mem_cmp(session->self_mac_addr,
				 &mac_hdr->da[0], sizeof(tSirMacAddr))) {
			pe_debug("Rcvd Vendor specific frame OUI: %x %x %x",
				vendor_specific->Oui[0],
				vendor_specific->Oui[1],
@@ -1854,15 +1851,7 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
					WMA_GET_RX_RSSI_NORMALIZED(
					rx_pkt_info), RXMGMT_FLAG_NONE);
		} else {
			pe_debug("Dropping the vendor specific action frame"
					"beacause of (WES Mode not enabled "
					"(WESMODE: %d) or OUI mismatch "
					"(%02x %02x %02x) or not received with"
					"SelfSta address) system role: %d",
				IS_WES_MODE_ENABLED(mac_ctx),
				vendor_specific->Oui[0],
				vendor_specific->Oui[1],
				vendor_specific->Oui[2],
			pe_debug("Dropping the vendor specific action frame SelfSta address system role: %d",
				 GET_LIM_SYSTEM_ROLE(session));
		}
	break;
@@ -1896,11 +1885,15 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
			/* send the frame to supplicant */
			/* fallthrough */
		case SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY:
		case SIR_MAC_PROT_ACTION_VENDOR_SPECIFIC_CATEGORY:
		case SIR_MAC_ACTION_2040_BSS_COEXISTENCE:
		case SIR_MAC_ACTION_GAS_INITIAL_REQUEST:
		case SIR_MAC_ACTION_GAS_INITIAL_RESPONSE:
		case SIR_MAC_ACTION_GAS_COMEBACK_REQUEST:
		case SIR_MAC_ACTION_GAS_COMEBACK_RESPONSE:
		default:
			pe_debug("Public action frame: %d",
				 action_hdr->actionID);
			/*
			 * Forward to the SME to HDD to wpa_supplicant
			 * type is ACTION
@@ -1914,10 +1907,6 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
					WMA_GET_RX_RSSI_NORMALIZED(
					rx_pkt_info), RXMGMT_FLAG_NONE);
			break;
		default:
			pe_debug("Unhandled public action frame: %d",
				 action_hdr->actionID);
			break;
		}
		break;