qcacld-3.0: Send NAN disable indication to userspace upon SSR

Currently, host driver sends NAN disable request to firmware and
firmware sends NAN disable indication as a response. Host driver
forwards this indication to framework. But when SSR happens,
driver needs to send this NAN disable indication to framework
as firmware lost the NAN context. This allows framework to
initiate NAN again. Send the NAN disable indication with success
status code to framework after recovery.

Change-Id: Ic2139e159f0c1d9c1fb5c39597ce18e0787e809b
CRs-Fixed: 2735047
This commit is contained in:
Srinivas Dasari
2020-07-18 16:16:13 +05:30
committed by snandini
parent e0fe1711e5
commit 7586ee3a5e
4 changed files with 87 additions and 0 deletions

View File

@@ -531,6 +531,39 @@ struct nan_event_params {
uint8_t buf[];
};
#define NAN_MSG_ID_DISABLE_INDICATION 26
/**
* struct nan_msg_hdr - NAN msg header to be sent to userspace
* @msg_version: NAN msg version
* @msg_id: NAN message id
* @reserved: Reserved for now to avoid padding
*
* 8-byte control message header used by NAN
*
*/
struct nan_msg_hdr {
uint16_t msg_version:4;
uint16_t msg_id:12;
uint16_t reserved[3];
};
#define NAN_STATUS_SUCCESS 0
#define NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED 12
/**
* struct nan_disable_ind_msg - NAN disable ind params
* @msg_hdr: NAN msg header
* @reason: NAN disable reason, below are valid reasons for NAN disable ind
* NAN_STATUS_SUCCESS
* NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED
* @reserved: Reserved for now to avoid padding
*/
struct nan_disable_ind_msg {
struct nan_msg_hdr msg_hdr;
uint16_t reason;
uint16_t reserved;
};
/**
* struct nan_msg_params - NAN request params
* @request_data_len: request data length