diff --git a/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_public_structs.h b/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_public_structs.h index 2afd61c097..b4332c8f0a 100644 --- a/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_public_structs.h +++ b/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_public_structs.h @@ -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 * 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 + * @detect_enable: the flag to enable detect issue ap * @count: the number of interop issues ap * @rap_items: interop issues ap items */ struct wlan_interop_issues_ap_info { + bool detect_enable; uint32_t count; struct qdf_mac_addr rap_items[MAX_INTEROP_ISSUES_AP_NUM]; }; diff --git a/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_ucfg_api.h b/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_ucfg_api.h index 4d9508712e..ce90efdf56 100644 --- a/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_ucfg_api.h +++ b/components/interop_issues_ap/dispatcher/inc/wlan_interop_issues_ap_ucfg_api.h @@ -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 * 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 - * @vdev: the pointer of vdev object + * @psoc: the pointer of psoc object * @rap: the pointer of interop issues ap info * * 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); #else static inline diff --git a/components/interop_issues_ap/dispatcher/src/wlan_interop_issues_ap_ucfg_api.c b/components/interop_issues_ap/dispatcher/src/wlan_interop_issues_ap_ucfg_api.c index e53524cbcf..d40611e493 100644 --- a/components/interop_issues_ap/dispatcher/src/wlan_interop_issues_ap_ucfg_api.c +++ b/components/interop_issues_ap/dispatcher/src/wlan_interop_issues_ap_ucfg_api.c @@ -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 * any purpose with or without fee is hereby granted, provided that the @@ -26,10 +26,10 @@ #include 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) { - 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, diff --git a/os_if/interop_issues_ap/src/wlan_cfg80211_interop_issues_ap.c b/os_if/interop_issues_ap/src/wlan_cfg80211_interop_issues_ap.c index ebdd22d68d..1d3c6ca22a 100644 --- a/os_if/interop_issues_ap/src/wlan_cfg80211_interop_issues_ap.c +++ b/os_if/interop_issues_ap/src/wlan_cfg80211_interop_issues_ap.c @@ -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 * 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; uint32_t count = 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, 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); interop_issues_ap.count = count; + interop_issues_ap.detect_enable = true; /* * need to figure out a converged way of obtaining the vdev for * 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; } @@ -234,10 +242,20 @@ void wlan_cfg80211_init_interop_issues_ap(struct wlan_objmgr_pdev *pdev) * cnss-daemon does not restart. */ 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_objmgr_psoc *psoc; 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; qdf_mem_copy(data.rap_addr.bytes, fmac, QDF_MAC_ADDR_SIZE);