qcacld-3.0: Support RRM action frame for SAP mode

Support neighbor response and beacon request
transmit from driver and deliver received
neighbor request and beacon report to hostapd.

Change-Id: I6a27d04ab4b558c4af799cc185b92f011194233d
CRs-Fixed: 3279625
This commit is contained in:
Meng Yuan
2022-08-24 14:15:19 +08:00
committed by Madan Koyyalamudi
parent 4263e18cdc
commit 0fce1cafb7
4 changed files with 41 additions and 0 deletions

View File

@@ -770,6 +770,10 @@ static char *p2p_get_frame_type_str(struct p2p_frame_info *frame_info)
return "GAS come back response"; return "GAS come back response";
case P2P_PUBLIC_ACTION_WNM_BTM_REQ: case P2P_PUBLIC_ACTION_WNM_BTM_REQ:
return "BTM request"; return "BTM request";
case P2P_PUBLIC_ACTION_RRM_BEACON_REQ:
return "BEACON request";
case P2P_PUBLIC_ACTION_RRM_NEIGHBOR_RSP:
return "NEIGHBOR response";
default: default:
return "Other frame"; return "Other frame";
} }
@@ -854,6 +858,17 @@ static QDF_STATUS p2p_get_frame_info(uint8_t *data_buf, uint32_t length,
P2P_PUBLIC_ACTION_WNM_BTM_REQ; P2P_PUBLIC_ACTION_WNM_BTM_REQ;
} }
break; break;
case RRM_ACTION_FRAME:
if (buf[1] == RRM_RADIO_MEASURE_REQ) {
action_type = buf[0];
frame_info->public_action_type =
P2P_PUBLIC_ACTION_RRM_BEACON_REQ;
} else if (buf[1] == RRM_NEIGHBOR_RPT) {
action_type = buf[0];
frame_info->public_action_type =
P2P_PUBLIC_ACTION_RRM_NEIGHBOR_RSP;
}
break;
default: default:
break; break;
} }

View File

@@ -35,6 +35,7 @@
#define P2P_PUBLIC_ACTION_VENDOR_SPECIFIC 0x9 #define P2P_PUBLIC_ACTION_VENDOR_SPECIFIC 0x9
#define P2P_NOA_ATTR 0xC #define P2P_NOA_ATTR 0xC
#define WNM_ACTION_FRAME 0xA #define WNM_ACTION_FRAME 0xA
#define RRM_ACTION_FRAME 0x5
#define P2P_MAX_NOA_ATTR_LEN 31 #define P2P_MAX_NOA_ATTR_LEN 31
#define P2P_IE_HEADER_LEN 6 #define P2P_IE_HEADER_LEN 6
@@ -113,6 +114,8 @@ enum p2p_frame_sub_type {
* @P2P_PUBLIC_ACTION_GAS_COMB_REQ: gas comeback request * @P2P_PUBLIC_ACTION_GAS_COMB_REQ: gas comeback request
* @P2P_PUBLIC_ACTION_GAS_COMB_RSP: gas comeback response * @P2P_PUBLIC_ACTION_GAS_COMB_RSP: gas comeback response
* @P2P_PUBLIC_ACTION_WNM_BTM_REQ: bss transition management request * @P2P_PUBLIC_ACTION_WNM_BTM_REQ: bss transition management request
* @P2P_PUBLIC_ACTION_RRM_BEACON_REQ:rrm beacon request
* @P2P_PUBLIC_ACTION_RRM_NEIGHBOR_RSP:rrm neighbor response
* @P2P_PUBLIC_ACTION_NOT_SUPPORT: not support p2p public action frame * @P2P_PUBLIC_ACTION_NOT_SUPPORT: not support p2p public action frame
*/ */
enum p2p_public_action_type { enum p2p_public_action_type {
@@ -130,6 +133,8 @@ enum p2p_public_action_type {
P2P_PUBLIC_ACTION_GAS_COMB_REQ, P2P_PUBLIC_ACTION_GAS_COMB_REQ,
P2P_PUBLIC_ACTION_GAS_COMB_RSP, P2P_PUBLIC_ACTION_GAS_COMB_RSP,
P2P_PUBLIC_ACTION_WNM_BTM_REQ, P2P_PUBLIC_ACTION_WNM_BTM_REQ,
P2P_PUBLIC_ACTION_RRM_BEACON_REQ,
P2P_PUBLIC_ACTION_RRM_NEIGHBOR_RSP,
P2P_PUBLIC_ACTION_NOT_SUPPORT, P2P_PUBLIC_ACTION_NOT_SUPPORT,
}; };

View File

@@ -4881,6 +4881,8 @@ int wlan_hdd_cfg80211_update_apies(struct hdd_adapter *adapter)
WLAN_ELEMID_WAPI); WLAN_ELEMID_WAPI);
} }
#endif #endif
/* extract and add rrm ie from hostapd */
wlan_hdd_add_extra_ie(adapter, genie, &total_ielen, WLAN_ELEMID_RRM);
wlan_hdd_add_hostapd_conf_vsie(adapter, genie, wlan_hdd_add_hostapd_conf_vsie(adapter, genie,
&total_ielen); &total_ielen);

View File

@@ -1908,6 +1908,25 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
break; break;
} }
} else if (LIM_IS_AP_ROLE(session)) {
switch (action_hdr->actionID) {
case RRM_NEIGHBOR_REQ:
case RRM_RADIO_MEASURE_RPT:
rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
mac_hdr = WMA_GET_RX_MAC_HEADER(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_FREQ(rx_pkt_info),
rssi, RXMGMT_FLAG_NONE);
break;
default:
pe_warn("Action ID: %d not handled in RRM",
action_hdr->actionID);
break;
}
} else { } else {
/* Else we will just ignore the RRM messages. */ /* Else we will just ignore the RRM messages. */
pe_debug("RRM frm ignored, it is disabled in cfg: %d or DHCP not completed: %d", pe_debug("RRM frm ignored, it is disabled in cfg: %d or DHCP not completed: %d",