mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Add diag event for offload requests
qcacld-2.0 to qcacld-3.0 propagation Add diag event for EVENT_OFFLOAD_REQ. This events contains info if host has enabled or disabled the offload. Change-Id: I19fe216ac0900dedbcb7b247cf0d171979308dc5 CRs-Fixed: 934455
This commit is contained in:
parent
baea27d52a
commit
4aad0f7daa
4 changed files with 54 additions and 1 deletions
|
|
@ -57,4 +57,13 @@ typedef struct {
|
|||
struct qdf_mac_addr bssId;
|
||||
} tHostOffloadRequest, *tpHostOffloadRequest;
|
||||
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
||||
void hdd_wlan_offload_event(uint8_t type, uint8_t state);
|
||||
#else
|
||||
static inline
|
||||
void hdd_wlan_offload_event(uint8_t type, uint8_t state)
|
||||
{
|
||||
}
|
||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
||||
|
||||
#endif /* __WLAN_HDD_HOST_OFFLOAD_H__ */
|
||||
|
|
|
|||
|
|
@ -104,6 +104,27 @@ void hdd_wlan_suspend_resume_event(uint8_t state)
|
|||
suspend_state.state = state;
|
||||
WLAN_HOST_DIAG_EVENT_REPORT(&suspend_state, EVENT_WLAN_SUSPEND_RESUME);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_wlan_offload_event()- send offloads event
|
||||
* @type: offload type
|
||||
* @state: enabled or disabled
|
||||
*
|
||||
* This Function send offloads enable/disable diag event
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
|
||||
void hdd_wlan_offload_event(uint8_t type, uint8_t state)
|
||||
{
|
||||
WLAN_HOST_DIAG_EVENT_DEF(host_offload, struct host_event_offload_req);
|
||||
qdf_mem_zero(&host_offload, sizeof(host_offload));
|
||||
|
||||
host_offload.offload_type = type;
|
||||
host_offload.state = state;
|
||||
|
||||
WLAN_HOST_DIAG_EVENT_REPORT(&host_offload, EVENT_WLAN_OFFLOAD_REQ);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Function and variables declarations */
|
||||
|
|
@ -406,6 +427,8 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
&offLoadRequest.nsOffloadInfo.selfIPv6Addr[i],
|
||||
&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i], i);
|
||||
}
|
||||
hdd_wlan_offload_event(SIR_IPV6_NS_OFFLOAD,
|
||||
SIR_OFFLOAD_ENABLE);
|
||||
offLoadRequest.offloadType = SIR_IPV6_NS_OFFLOAD;
|
||||
offLoadRequest.enableOrDisable = SIR_OFFLOAD_ENABLE;
|
||||
qdf_copy_macaddr(&offLoadRequest.nsOffloadInfo.self_macaddr,
|
||||
|
|
@ -424,6 +447,8 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
hdd_wlan_offload_event(SIR_IPV6_NS_OFFLOAD,
|
||||
SIR_OFFLOAD_DISABLE);
|
||||
/* Disable NSOffload */
|
||||
qdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq));
|
||||
offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
|
||||
|
|
@ -739,6 +764,8 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
if (ifa && ifa->ifa_local) {
|
||||
offLoadRequest.offloadType = SIR_IPV4_ARP_REPLY_OFFLOAD;
|
||||
offLoadRequest.enableOrDisable = SIR_OFFLOAD_ENABLE;
|
||||
hdd_wlan_offload_event(SIR_IPV4_ARP_REPLY_OFFLOAD,
|
||||
SIR_OFFLOAD_ENABLE);
|
||||
|
||||
hddLog(QDF_TRACE_LEVEL_INFO, "%s: Enabled", __func__);
|
||||
|
||||
|
|
@ -753,7 +780,9 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
hddLog(QDF_TRACE_LEVEL_INFO,
|
||||
"offload: inside arp offload conditional check");
|
||||
}
|
||||
|
||||
hdd_wlan_offload_event(
|
||||
SIR_OFFLOAD_ARP_AND_BCAST_FILTER_ENABLE,
|
||||
SIR_OFFLOAD_ENABLE);
|
||||
hddLog(QDF_TRACE_LEVEL_INFO,
|
||||
"offload: arp filter programmed = %d",
|
||||
offLoadRequest.enableOrDisable);
|
||||
|
|
@ -786,6 +815,8 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
|
|||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
hdd_wlan_offload_event(SIR_IPV4_ARP_REPLY_OFFLOAD,
|
||||
SIR_OFFLOAD_DISABLE);
|
||||
qdf_mem_zero((void *)&offLoadRequest,
|
||||
sizeof(tSirHostOffloadReq));
|
||||
offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
|
||||
|
|
|
|||
|
|
@ -337,6 +337,18 @@ struct host_event_suspend {
|
|||
uint8_t state;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct host_event_offload_req - offload state
|
||||
* @offload_type: offload type
|
||||
* @state: enabled or disabled state
|
||||
*
|
||||
* This structure contains offload diag event info
|
||||
*/
|
||||
struct host_event_offload_req {
|
||||
uint8_t offload_type;
|
||||
uint8_t state;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
Function declarations and documenation
|
||||
------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ typedef enum {
|
|||
EVENT_WLAN_TDLS_TEARDOWN = 0xAB5,
|
||||
EVENT_WLAN_TDLS_ENABLE_LINK = 0XAB6,
|
||||
EVENT_WLAN_SUSPEND_RESUME = 0xAB7,
|
||||
EVENT_WLAN_OFFLOAD_REQ = 0xAB8,
|
||||
|
||||
EVENT_MAX_ID = 0x0FFF
|
||||
} event_id_enum_type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue