diff --git a/core/hdd/inc/wlan_hdd_nan.h b/core/hdd/inc/wlan_hdd_nan.h index 8fd59d67ab51..acd4d2ec1cd8 100644 --- a/core/hdd/inc/wlan_hdd_nan.h +++ b/core/hdd/inc/wlan_hdd_nan.h @@ -31,23 +31,6 @@ struct hdd_context; struct wiphy; struct wireless_dev; -/** - * wlan_hdd_cfg80211_nan_request() - handle NAN request - * @wiphy: pointer to wireless wiphy structure. - * @wdev: pointer to wireless_dev structure. - * @data: Pointer to the data to be passed via vendor interface - * @data_len:Length of the data to be passed - * - * This function is called by userspace to send a NAN request to - * firmware. This is an SSR-protected wrapper function. - * - * Return: 0 on success, negative errno on failure - */ -int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy, - struct wireless_dev *wdev, - const void *data, - int data_len); - bool wlan_hdd_nan_is_supported(struct hdd_context *hdd_ctx); /** @@ -68,15 +51,6 @@ int wlan_hdd_cfg80211_nan_ext_request(struct wiphy *wiphy, int data_len); #define FEATURE_NAN_VENDOR_COMMANDS \ - { \ - .info.vendor_id = QCA_NL80211_VENDOR_ID, \ - .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NAN, \ - .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ - WIPHY_VENDOR_CMD_NEED_NETDEV | \ - WIPHY_VENDOR_CMD_NEED_RUNNING, \ - .doit = wlan_hdd_cfg80211_nan_request, \ - vendor_command_policy(VENDOR_CMD_RAW_DATA, 0) \ - }, \ { \ .info.vendor_id = QCA_NL80211_VENDOR_ID, \ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NAN_EXT, \ diff --git a/core/hdd/src/wlan_hdd_nan.c b/core/hdd/src/wlan_hdd_nan.c index 79ab02c9fc32..1cee02031bfb 100644 --- a/core/hdd/src/wlan_hdd_nan.c +++ b/core/hdd/src/wlan_hdd_nan.c @@ -50,65 +50,6 @@ bool wlan_hdd_nan_is_supported(struct hdd_context *hdd_ctx) sme_is_feature_supported_by_fw(NAN); } -/** - * __wlan_hdd_cfg80211_nan_request() - cfg80211 NAN request handler - * @wiphy: driver's wiphy struct - * @wdev: wireless device to which the request is targeted - * @data: actual request data (netlink-encapsulated) - * @data_len: length of @data - * - * This is called when userspace needs to send a nan request to - * firmware. The wlan host driver simply de-encapsulates the - * request from the netlink payload and then forwards it to - * firmware via SME. - * - * Return: 0 on success, negative errno on failure - */ -static int __wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy, - struct wireless_dev *wdev, - const void *data, int data_len) -{ - int ret_val; - struct hdd_context *hdd_ctx = wiphy_priv(wiphy); - - hdd_enter_dev(wdev->netdev); - - ret_val = wlan_hdd_validate_context(hdd_ctx); - if (ret_val) - return ret_val; - - if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { - hdd_err_rl("Command not allowed in FTM mode"); - return -EPERM; - } - - if (!cfg_nan_get_enable(hdd_ctx->psoc)) { - hdd_err_rl("NaN support is not enabled in INI"); - return -EPERM; - } - - return os_if_nan_legacy_req(hdd_ctx->psoc, data, data_len); -} - -int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy, - struct wireless_dev *wdev, const void *data, - int data_len) - -{ - struct osif_psoc_sync *psoc_sync; - int errno; - - errno = osif_psoc_sync_op_start(wiphy_dev(wiphy), &psoc_sync); - if (errno) - return errno; - - errno = __wlan_hdd_cfg80211_nan_request(wiphy, wdev, data, data_len); - - osif_psoc_sync_op_stop(psoc_sync); - - return errno; -} - /** * __wlan_hdd_cfg80211_nan_ext_request() - cfg80211 NAN extended request handler * @wiphy: driver's wiphy struct diff --git a/os_if/nan/inc/os_if_nan.h b/os_if/nan/inc/os_if_nan.h index 442ec270480d..168078df2759 100644 --- a/os_if/nan/inc/os_if_nan.h +++ b/os_if/nan/inc/os_if_nan.h @@ -155,18 +155,6 @@ static inline QDF_STATUS os_if_nan_set_ndp_delete_transaction_id( return ucfg_nan_set_ndp_delete_transaction_id(vdev, val); } -/** - * os_if_nan_legacy_req: os_if api to handle NAN requests attached to the vendor - * command QCA_NL80211_VENDOR_SUBCMD_NAN - * @psoc: pointer to psoc object - * @data: request data. contains vendor cmd tlvs - * @data_len: length of data - * - * Return: status of operation - */ -int os_if_nan_legacy_req(struct wlan_objmgr_psoc *psoc, const void *data, - int data_len); - /** * os_if_process_nan_req: os_if api to handle NAN requests attached to the * vendor command QCA_NL80211_VENDOR_SUBCMD_NAN_EXT diff --git a/os_if/nan/src/os_if_nan.c b/os_if/nan/src/os_if_nan.c index 80d0b9dbf563..bf0c4b4959ff 100644 --- a/os_if/nan/src/os_if_nan.c +++ b/os_if/nan/src/os_if_nan.c @@ -2523,40 +2523,6 @@ static int os_if_nan_generic_req(struct wlan_objmgr_psoc *psoc, return qdf_status_to_os_return(status); } -int os_if_nan_legacy_req(struct wlan_objmgr_psoc *psoc, const void *data, - int data_len) -{ - struct nan_generic_req *nan_req; - QDF_STATUS status; - - if (data_len > NAN_CMD_MAX_SIZE) { - osif_err("NAN request exceeding max allowed size"); - return -EINVAL; - } - - nan_req = qdf_mem_malloc(sizeof(*nan_req) + data_len); - if (!nan_req) - return -ENOMEM; - - nan_req->psoc = psoc; - nan_req->params.request_data_len = data_len; - qdf_mem_copy(nan_req->params.request_data, data, data_len); - - /* - * Send legacy NAN requests with type GENERIC, these will be treated as - * passthrough by the driver. These will not affect the NAN state - * machine or policy manager. - */ - status = ucfg_nan_discovery_req(nan_req, NAN_GENERIC_REQ); - - if (QDF_IS_STATUS_ERROR(status)) - osif_err("Failed to post NAN request"); - - qdf_mem_free(nan_req); - - return qdf_status_to_os_return(status); -} - static int os_if_process_nan_disable_req(struct wlan_objmgr_psoc *psoc, struct nlattr **tb) {