mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Add diag event for TDLS management frame tx and rx
qcacld-2.0 to qcacld-3.0 propagation Add diag event for EVENT_WLAN_TDLS_TX_RX_MGMT. This event contains TDLS action frame type, subtype and if its rx or tx. Change-Id: I6ec744518b7a391e4511c503cb858d532ef11322 CRs-Fixed: 934447
This commit is contained in:
parent
af1d0c92ec
commit
437606ac2d
8 changed files with 84 additions and 4 deletions
|
|
@ -242,4 +242,17 @@ QDF_STATUS cds_flush_logs(uint32_t is_fatal,
|
|||
uint32_t indicator,
|
||||
uint32_t reason_code);
|
||||
void cds_logging_set_fw_flush_complete(void);
|
||||
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
||||
void cds_tdls_tx_rx_mgmt_event(uint8_t event_id, uint8_t tx_rx,
|
||||
uint8_t type, uint8_t sub_type, uint8_t *peer_mac);
|
||||
#else
|
||||
static inline
|
||||
void cds_tdls_tx_rx_mgmt_event(uint8_t event_id, uint8_t tx_rx,
|
||||
uint8_t type, uint8_t sub_type, uint8_t *peer_mac)
|
||||
|
||||
{
|
||||
}
|
||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
|
||||
#endif /* if !defined __CDS_API_H */
|
||||
|
|
|
|||
|
|
@ -130,6 +130,36 @@ void cds_deinit(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
||||
/**
|
||||
* cds_tdls_tx_rx_mgmt_event()- send tdls mgmt rx tx event
|
||||
* @event_id: event id
|
||||
* @tx_rx: tx or rx
|
||||
* @type: type of frame
|
||||
* @action_sub_type: action frame type
|
||||
* @peer_mac: peer mac
|
||||
*
|
||||
* This Function sends tdls mgmt rx tx diag event
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
void cds_tdls_tx_rx_mgmt_event(uint8_t event_id, uint8_t tx_rx,
|
||||
uint8_t type, uint8_t action_sub_type, uint8_t *peer_mac)
|
||||
{
|
||||
WLAN_HOST_DIAG_EVENT_DEF(tdls_tx_rx_mgmt,
|
||||
struct host_event_tdls_tx_rx_mgmt);
|
||||
|
||||
tdls_tx_rx_mgmt.event_id = event_id;
|
||||
tdls_tx_rx_mgmt.tx_rx = tx_rx;
|
||||
tdls_tx_rx_mgmt.type = type;
|
||||
tdls_tx_rx_mgmt.action_sub_type = action_sub_type;
|
||||
qdf_mem_copy(tdls_tx_rx_mgmt.peer_mac,
|
||||
peer_mac, CDS_MAC_ADDRESS_LEN);
|
||||
WLAN_HOST_DIAG_EVENT_REPORT(&tdls_tx_rx_mgmt,
|
||||
EVENT_WLAN_TDLS_TX_RX_MGMT);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_NAN
|
||||
/**
|
||||
* cds_set_nan_enable() - set nan enable flag in mac open param
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@
|
|||
#define WLAN_HDD_80211_FRM_DA_OFFSET 4
|
||||
#define P2P_WILDCARD_SSID_LEN 7
|
||||
#define P2P_WILDCARD_SSID "DIRECT-"
|
||||
#define WLAN_HDD_80211_PEER_ADDR_OFFSET (WLAN_HDD_80211_FRM_DA_OFFSET + \
|
||||
MAC_ADDR_LEN)
|
||||
|
||||
|
||||
#ifdef QCA_WIFI_3_0_EMU
|
||||
#define P2P_ROC_DURATION_MULTIPLIER_GO_PRESENT 2
|
||||
|
|
|
|||
|
|
@ -2247,8 +2247,8 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
|
|||
+ 2], SIR_MAC_P2P_OUI,
|
||||
SIR_MAC_P2P_OUI_SIZE)) {
|
||||
/* P2P action frames */
|
||||
u8 *macFrom =
|
||||
&pbFrames[WLAN_HDD_80211_FRM_DA_OFFSET + 6];
|
||||
u8 *macFrom = &pbFrames
|
||||
[WLAN_HDD_80211_PEER_ADDR_OFFSET];
|
||||
actionFrmType =
|
||||
pbFrames
|
||||
[WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
|
||||
|
|
@ -2409,8 +2409,8 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
|
|||
else if (pbFrames
|
||||
[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET + 1] ==
|
||||
WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP) {
|
||||
u8 *mac =
|
||||
&pbFrames[WLAN_HDD_80211_FRM_DA_OFFSET + 6];
|
||||
u8 *mac = &pbFrames
|
||||
[WLAN_HDD_80211_PEER_ADDR_OFFSET];
|
||||
|
||||
hddLog(LOG1,
|
||||
"[TDLS] TDLS Discovery Response,"
|
||||
|
|
@ -2420,6 +2420,10 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
|
|||
wlan_hdd_tdls_set_rssi(pAdapter, mac, rxRssi);
|
||||
wlan_hdd_tdls_recv_discovery_resp(pAdapter,
|
||||
mac);
|
||||
cds_tdls_tx_rx_mgmt_event(SIR_MAC_ACTION_TDLS,
|
||||
SIR_MAC_ACTION_RX, SIR_MAC_MGMT_ACTION,
|
||||
WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP,
|
||||
&pbFrames[WLAN_HDD_80211_PEER_ADDR_OFFSET]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2437,6 +2441,10 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
|
|||
"[TDLS] %s <--- OTA",
|
||||
tdls_action_frame_type[actionFrmType]);
|
||||
}
|
||||
cds_tdls_tx_rx_mgmt_event(SIR_MAC_ACTION_TDLS,
|
||||
SIR_MAC_ACTION_RX, SIR_MAC_MGMT_ACTION,
|
||||
actionFrmType,
|
||||
&pbFrames[WLAN_HDD_80211_PEER_ADDR_OFFSET]);
|
||||
}
|
||||
|
||||
if ((pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] ==
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@
|
|||
#define SIR_MAC_ACTION_FST 18
|
||||
#define SIR_MAC_ACTION_VHT 21
|
||||
|
||||
#define SIR_MAC_ACTION_TX 1
|
||||
#define SIR_MAC_ACTION_RX 2
|
||||
|
||||
/* QoS management action codes */
|
||||
|
||||
#define SIR_MAC_QOS_ADD_TS_REQ 0
|
||||
|
|
|
|||
|
|
@ -2757,6 +2757,10 @@ tSirRetStatus lim_process_sme_tdls_mgmt_send_req(tpAniSirGlobal mac_ctx,
|
|||
goto lim_tdls_send_mgmt_error;
|
||||
}
|
||||
|
||||
cds_tdls_tx_rx_mgmt_event(SIR_MAC_ACTION_TDLS,
|
||||
SIR_MAC_ACTION_TX, SIR_MAC_MGMT_ACTION,
|
||||
send_req->reqType, send_req->peer_mac.bytes);
|
||||
|
||||
switch (send_req->reqType) {
|
||||
case SIR_MAC_TDLS_DIS_REQ:
|
||||
lim_log(mac_ctx, LOG1, FL("Transmit Discovery Request Frame"));
|
||||
|
|
|
|||
|
|
@ -361,6 +361,24 @@ struct host_event_tdls_scan_rejected {
|
|||
uint8_t status;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct host_event_tdls_tx_rx_mgmt - for TX RX management frame
|
||||
* @event_id: event ID
|
||||
* @tx_rx: tx or rx
|
||||
* @type: type of frame
|
||||
* @action_sub_type: action frame type
|
||||
* @peer_mac: peer mac
|
||||
*
|
||||
* This structure contains tdls TX RX management frame info
|
||||
*/
|
||||
struct host_event_tdls_tx_rx_mgmt {
|
||||
uint8_t event_id;
|
||||
uint8_t tx_rx;
|
||||
uint8_t type;
|
||||
uint8_t action_sub_type;
|
||||
uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
Function declarations and documenation
|
||||
------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ typedef enum {
|
|||
EVENT_WLAN_SUSPEND_RESUME = 0xAB7,
|
||||
EVENT_WLAN_OFFLOAD_REQ = 0xAB8,
|
||||
EVENT_TDLS_SCAN_BLOCK = 0xAB9,
|
||||
EVENT_WLAN_TDLS_TX_RX_MGMT = 0xABA,
|
||||
|
||||
EVENT_MAX_ID = 0x0FFF
|
||||
} event_id_enum_type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue