瀏覽代碼

qcacld-3.0: Add interface index for roam scan ch list event

To specify interface index in vendor event for sub command
QCA_NL80211_VENDOR_SUBCMD_UPDATE_STA_INFO_INDEX, pass wdev pointer
to cfg80211_vendor_event_alloc().

Change-id: Ied973df111359bbab44e2c1de0888a67e1497034
CRs-Fixed: 2644349
Abhishek Ambure 5 年之前
父節點
當前提交
09fbde6405
共有 3 個文件被更改,包括 17 次插入7 次删除
  1. 8 2
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 7 4
      core/hdd/src/wlan_hdd_cfg80211.h
  3. 2 1
      core/hdd/src/wlan_hdd_ioctl.c

+ 8 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -6285,9 +6285,11 @@ wlan_hdd_add_fils_params_roam_auth_event(struct sk_buff *skb,
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
-				      uint16_t buf_len, uint8_t *buf)
+				      uint8_t vdev_id, uint16_t buf_len,
+				      uint8_t *buf)
 {
 	struct sk_buff *vendor_event;
+	struct hdd_adapter *adapter;
 	uint32_t len, ret;
 
 	if (!hdd_ctx) {
@@ -6295,10 +6297,14 @@ void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
 		return;
 	}
 
+	adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
+	if (!adapter)
+		return;
+
 	len = nla_total_size(buf_len) + NLMSG_HDRLEN;
 	vendor_event =
 		cfg80211_vendor_event_alloc(
-			hdd_ctx->wiphy, NULL, len,
+			hdd_ctx->wiphy, &(adapter->wdev), len,
 			QCA_NL80211_VENDOR_SUBCMD_UPDATE_STA_INFO_INDEX,
 			GFP_KERNEL);
 

+ 7 - 4
core/hdd/src/wlan_hdd_cfg80211.h

@@ -504,13 +504,15 @@ void wlan_hdd_cfg80211_acs_ch_select_evt(struct hdd_adapter *adapter);
 /**
  * hdd_send_roam_scan_ch_list_event() - roam scan ch list event to user space
  * @hdd_ctx: HDD context
+ * @vdev_id: vdev id
  * @buf_len: length of frequency list
  * @buf: pointer to buffer of frequency list
  *
  * Return: None
  */
 void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
-				      uint16_t buf_len, uint8_t *buf);
+				      uint8_t vdev_id, uint16_t buf_len,
+				      uint8_t *buf);
 
 int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter, uint8_t *bssid,
 		uint8_t *req_rsn_ie, uint32_t req_rsn_length, uint8_t
@@ -525,9 +527,10 @@ static inline int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter,
 	return 0;
 }
 
-static inline void
-hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
-				 uint16_t buf_len, uint8_t *buf)
+static inline
+void hdd_send_roam_scan_ch_list_event(struct hdd_context *hdd_ctx,
+				      uint8_t vdev_id, uint16_t buf_len,
+				      uint8_t *buf)
 {
 }
 #endif

+ 2 - 1
core/hdd/src/wlan_hdd_ioctl.c

@@ -4041,7 +4041,8 @@ void hdd_get_roam_scan_ch_cb(hdd_handle_t hdd_handle,
 			freq[i] = roam_ch->chan_list[i];
 		}
 
-		hdd_send_roam_scan_ch_list_event(hdd_ctx, len, event);
+		hdd_send_roam_scan_ch_list_event(hdd_ctx, roam_ch->vdev_id,
+						 len, event);
 		qdf_mem_free(event);
 		return;
 	}