qcacld-3.0: enable interop issues ap detection

Enable interop issues ap detection function when driver starts up.

Change-Id: Id7f616e19ab6f5f71191c3a93c5b0b5747766437
CRs-Fixed: 2601974
This commit is contained in:
Paul Zhang
2020-01-15 15:48:36 +08:00
committed by nshrivas
parent d95ac82d6d
commit dc4c2a6afc
4 changed files with 29 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -31,10 +31,12 @@
/** /**
* struct wlan_interop_issues_ap_info - interop issues ap info * struct wlan_interop_issues_ap_info - interop issues ap info
* @detect_enable: the flag to enable detect issue ap
* @count: the number of interop issues ap * @count: the number of interop issues ap
* @rap_items: interop issues ap items * @rap_items: interop issues ap items
*/ */
struct wlan_interop_issues_ap_info { struct wlan_interop_issues_ap_info {
bool detect_enable;
uint32_t count; uint32_t count;
struct qdf_mac_addr rap_items[MAX_INTEROP_ISSUES_AP_NUM]; struct qdf_mac_addr rap_items[MAX_INTEROP_ISSUES_AP_NUM];
}; };

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -71,12 +71,12 @@ void ucfg_register_interop_issues_ap_callback(struct wlan_objmgr_pdev *pdev,
/** /**
* ucfg_set_interop_issues_ap_config() - API to set interop issues ap * ucfg_set_interop_issues_ap_config() - API to set interop issues ap
* @vdev: the pointer of vdev object * @psoc: the pointer of psoc object
* @rap: the pointer of interop issues ap info * @rap: the pointer of interop issues ap info
* *
* Return: none * Return: none
*/ */
QDF_STATUS ucfg_set_interop_issues_ap_config(struct wlan_objmgr_vdev *vdev, QDF_STATUS ucfg_set_interop_issues_ap_config(struct wlan_objmgr_psoc *psoc,
struct wlan_interop_issues_ap_info *rap); struct wlan_interop_issues_ap_info *rap);
#else #else
static inline static inline

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -26,10 +26,10 @@
#include <wlan_interop_issues_ap_api.h> #include <wlan_interop_issues_ap_api.h>
QDF_STATUS QDF_STATUS
ucfg_set_interop_issues_ap_config(struct wlan_objmgr_vdev *vdev, ucfg_set_interop_issues_ap_config(struct wlan_objmgr_psoc *psoc,
struct wlan_interop_issues_ap_info *rap) struct wlan_interop_issues_ap_info *rap)
{ {
return tgt_set_interop_issues_ap_req(wlan_vdev_get_psoc(vdev), rap); return tgt_set_interop_issues_ap_req(psoc, rap);
} }
void ucfg_register_interop_issues_ap_callback(struct wlan_objmgr_pdev *pdev, void ucfg_register_interop_issues_ap_callback(struct wlan_objmgr_pdev *pdev,

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -178,6 +178,13 @@ __wlan_cfg80211_set_interop_issues_ap_config(struct wiphy *wiphy,
struct nlattr *attr; struct nlattr *attr;
uint32_t count = 0; uint32_t count = 0;
struct wlan_interop_issues_ap_info interop_issues_ap = {0}; struct wlan_interop_issues_ap_info interop_issues_ap = {0};
struct wlan_objmgr_psoc *psoc;
psoc = wlan_vdev_get_psoc(adapter->vdev);
if (!psoc) {
osif_err("Invalid psoc");
return -EINVAL;
}
if (wlan_cfg80211_nla_parse(tb, if (wlan_cfg80211_nla_parse(tb,
QCA_WLAN_VENDOR_ATTR_INTEROP_ISSUES_AP_MAX, QCA_WLAN_VENDOR_ATTR_INTEROP_ISSUES_AP_MAX,
@@ -198,12 +205,13 @@ __wlan_cfg80211_set_interop_issues_ap_config(struct wiphy *wiphy,
osif_debug("Num of interop issues ap: %d", count); osif_debug("Num of interop issues ap: %d", count);
interop_issues_ap.count = count; interop_issues_ap.count = count;
interop_issues_ap.detect_enable = true;
/* /*
* need to figure out a converged way of obtaining the vdev for * need to figure out a converged way of obtaining the vdev for
* a given netdev that doesn't involve the legacy mechanism. * a given netdev that doesn't involve the legacy mechanism.
*/ */
ucfg_set_interop_issues_ap_config(adapter->vdev, &interop_issues_ap); ucfg_set_interop_issues_ap_config(psoc, &interop_issues_ap);
return 0; return 0;
} }
@@ -234,10 +242,20 @@ void wlan_cfg80211_init_interop_issues_ap(struct wlan_objmgr_pdev *pdev)
* cnss-daemon does not restart. * cnss-daemon does not restart.
*/ */
uint8_t fmac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; uint8_t fmac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
struct wlan_interop_issues_ap_info interop_issues_ap = {0};
struct wlan_interop_issues_ap_event data; struct wlan_interop_issues_ap_event data;
struct wlan_objmgr_psoc *psoc;
wlan_interop_issues_ap_register_cbk(pdev); wlan_interop_issues_ap_register_cbk(pdev);
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc) {
osif_err("Invalid psoc");
return;
}
interop_issues_ap.detect_enable = true;
ucfg_set_interop_issues_ap_config(psoc, &interop_issues_ap);
data.pdev = pdev; data.pdev = pdev;
qdf_mem_copy(data.rap_addr.bytes, fmac, QDF_MAC_ADDR_SIZE); qdf_mem_copy(data.rap_addr.bytes, fmac, QDF_MAC_ADDR_SIZE);