qcacld-3.0: Send service id in NDP indication

Send service from wmi_ndp_indication_event_id to the userspace
via the new vendor attribute QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID
as part of ndp indication.

Change-Id: I90b4540d5f3c72bbb7e8b542406561daf2a7a869
CRs-fixed: 3128874
This commit is contained in:
Surya Prakash Sivaraj
2022-02-11 16:56:19 +05:30
committed by Madan Koyyalamudi
父節點 199787e599
當前提交 7fd14302fe
共有 2 個文件被更改,包括 18 次插入2 次删除

查看文件

@@ -51,7 +51,7 @@ struct wlan_objmgr_vdev;
#define NAN_PSEUDO_VDEV_ID CFG_TGT_NUM_VDEV
#define NAN_SER_CMD_TIMEOUT 4000
#define NDP_SERVICE_ID_LEN 6
/**
* enum nan_discovery_msg_type - NAN msg type
* @NAN_GENERIC_REQ: Type for all the NAN requests other than enable/disable
@@ -713,6 +713,8 @@ struct nan_datapath_confirm_event {
* @scid: security context identifier
* @is_ipv6_addr_present: indicates if following ipv6 address is valid
* @ipv6_addr: ipv6 address address used by ndp
* @is_service_id_present: indicates if service id is present
* @service_id: NDP service id
*/
struct nan_datapath_indication_event {
struct wlan_objmgr_vdev *vdev;
@@ -728,6 +730,8 @@ struct nan_datapath_indication_event {
struct nan_datapath_scid scid;
bool is_ipv6_addr_present;
uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
bool is_service_id_present;
uint8_t service_id[NDP_SERVICE_ID_LEN];
};
/**

查看文件

@@ -164,6 +164,10 @@ const struct nla_policy vendor_attr_policy[
.type = NLA_U8,
.len = sizeof(uint8_t)
},
[QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID] = {
.type = NLA_U8,
.len = NDP_SERVICE_ID_LEN
},
};
/**
@@ -1288,7 +1292,9 @@ static inline uint32_t osif_ndp_get_ndp_req_ind_len(
data_len += nla_total_size(event->scid.scid_len);
if (event->ndp_info.ndp_app_info_len)
data_len += nla_total_size(event->ndp_info.ndp_app_info_len);
if (event->is_service_id_present)
data_len += nla_total_size(vendor_attr_policy[
QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID].len);
return data_len;
}
@@ -1430,6 +1436,12 @@ static void os_if_ndp_indication_handler(struct wlan_objmgr_vdev *vdev,
goto ndp_indication_nla_failed;
}
if (event->is_service_id_present) {
if (nla_put(vendor_event, QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID,
NDP_SERVICE_ID_LEN, event->service_id))
goto ndp_indication_nla_failed;
}
cfg80211_vendor_event(vendor_event, GFP_ATOMIC);
return;
ndp_indication_nla_failed: