From patchwork Fri Sep 27 08:43:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 831167 Received: from forward200d.mail.yandex.net (forward200d.mail.yandex.net [178.154.239.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA697189B97 for ; Fri, 27 Sep 2024 08:51:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.221 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727427100; cv=none; b=NDs5mH69wqAXNJHhv1OiK5ZBxAkIcDIpvVNmaj8gwgXzysyXf0sG7B2haW+4D2fo9zjYToGolW1+/+MZaKC4/S6k1I2QRq9kAgVURf02dDX9Zt8GwSQHzzoGKJSMl/L4PwrFoxf7QjOj3nceE+xiXl1pJSM6kn2x7wFsXoXLIL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727427100; c=relaxed/simple; bh=jsIoMqVZNXghxRYkbEue9X4iBMVyjdL8fuqxnQH4S8Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=D8mVNNd9bw2Gq1V5UVxRqtx3wHeCwI+qbfKILqUi+MXZBsLZOJSxf5zGQUrz3tEjV/W1U3IdWMYpSAWxnD74jAdWeO/iR/riwUL35HVWl9WtFeuVmlk9vlsPFMZYpZkTk/hbNm4mSVmUglxNd5lESihUCxc6KpXgeU2c1puSfxQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru; spf=pass smtp.mailfrom=yandex.ru; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b=H01EDKnv; arc=none smtp.client-ip=178.154.239.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b="H01EDKnv" Received: from forward200a.mail.yandex.net (forward200a.mail.yandex.net [IPv6:2a02:6b8:c0e:500:1:45:d181:d200]) by forward200d.mail.yandex.net (Yandex) with ESMTPS id D1FD26700D for ; Fri, 27 Sep 2024 11:45:03 +0300 (MSK) Received: from forward100a.mail.yandex.net (forward100a.mail.yandex.net [IPv6:2a02:6b8:c0e:500:1:45:d181:d100]) by forward200a.mail.yandex.net (Yandex) with ESMTP id B0B9A6C546 for ; Fri, 27 Sep 2024 11:44:33 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:6a2:0:640:8042:0]) by forward100a.mail.yandex.net (Yandex) with ESMTPS id 392D946D42; Fri, 27 Sep 2024 11:44:26 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id PiRcldGOpCg0-ENSd26W7; Fri, 27 Sep 2024 11:44:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727426665; bh=dAfmTrmIcRUjXPrdO8VUtes0BhwlZeA5e3w5xX0/uME=; h=Message-ID:Date:Cc:Subject:To:From; b=H01EDKnvvoMt4ikhDew8IIgIHaOQovto80ecTUWuiJrCs8srXqJwj885ygk5k+gFW 7ZSaT7dyOQhJSjdj96ctxD+7WcRqEk3Upn+KglbR9rksCaVWxJIj8DnyXcwxFwqKhq DqsCTx4p6Pyd47lkKAPDGEe8p9+ciXk29Feg65GI= Authentication-Results: mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Brian Norris Cc: Kalle Valo , linux-wireless@vger.kernel.org, Dmitry Antipov Subject: [PATCH 1/2] wifi: mwifiex: cleanup struct mwifiex_auto_tdls_peer Date: Fri, 27 Sep 2024 11:43:16 +0300 Message-ID: <20240927084317.96687-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.46.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Yandex-Filter: 1 Remove set but otherwise unused 'do_setup' member of 'struct mwifiex_auto_tdls_peer'. Compile tested only. Fixes: 9927baa3c724 ("mwifiex: add auto TDLS support") Signed-off-by: Dmitry Antipov --- drivers/net/wireless/marvell/mwifiex/main.h | 1 - drivers/net/wireless/marvell/mwifiex/tdls.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index 566adce3413c..92a1cab6e750 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -802,7 +802,6 @@ struct mwifiex_auto_tdls_peer { unsigned long rssi_jiffies; u8 failure_count; u8 do_discover; - u8 do_setup; }; #define MWIFIEX_TYPE_AGGR_DATA_V2 11 diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c index 7823e67694e8..0a5f340876c3 100644 --- a/drivers/net/wireless/marvell/mwifiex/tdls.c +++ b/drivers/net/wireless/marvell/mwifiex/tdls.c @@ -1306,7 +1306,6 @@ int mwifiex_tdls_check_tx(struct mwifiex_private *priv, struct sk_buff *skb) peer->mac_addr, NL80211_TDLS_SETUP, 0, GFP_ATOMIC); - peer->do_setup = false; priv->check_tdls_tx = false; } else if (peer->failure_count < MWIFIEX_TDLS_MAX_FAIL_COUNT && @@ -1465,7 +1464,6 @@ void mwifiex_check_auto_tdls(struct timer_list *t) tdls_peer->failure_count < MWIFIEX_TDLS_MAX_FAIL_COUNT) { priv->check_tdls_tx = true; - tdls_peer->do_setup = true; mwifiex_dbg(priv->adapter, INFO, "check TDLS with peer=%pM\t" "rssi=%d\n", tdls_peer->mac_addr, From patchwork Fri Sep 27 08:43:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 831300 Received: from forward203a.mail.yandex.net (forward203a.mail.yandex.net [178.154.239.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4E3418A6CA for ; Fri, 27 Sep 2024 08:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.90 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727427035; cv=none; b=c9K4llu5cog6QEp5fjYuHA3lCL0iJjPx8Xb7U7SYmvBqyX06iLQ6NnVYSeOph2hApHUkm2k0ZBHMm3BeTNAAczoLSHp3W3kxROaGxQBMqikmaYyRe+4CYCI2xuNN4GkQTNPKG8gDCXyoe6y8soETuctezfNJQ2krDveByiCbvsg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727427035; c=relaxed/simple; bh=e09RDBS7PUQb9mCOvUrdJXMGThABwS9YFsmkLZJPBng=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fB4powQEryt3cqwrAEzTOwzLNtK+cOQl017C5OV0eFulmjTdzKxA5OIBnAYi4TNHr5q0rL3LTeajNtlLtYNoX6esuxax8ZfcuWgqquWXyYDyoU2sgtJ0Xw56DSN7gglTjshbHv7MYZCQ38cn8jBzF+5mgA4l0rYIc5Vp/T+jUOk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru; spf=pass smtp.mailfrom=yandex.ru; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b=US3NFJvO; arc=none smtp.client-ip=178.154.239.90 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b="US3NFJvO" Received: from forward100a.mail.yandex.net (forward100a.mail.yandex.net [IPv6:2a02:6b8:c0e:500:1:45:d181:d100]) by forward203a.mail.yandex.net (Yandex) with ESMTPS id A5CB861195 for ; Fri, 27 Sep 2024 11:44:34 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:6a2:0:640:8042:0]) by forward100a.mail.yandex.net (Yandex) with ESMTPS id 052FA47234; Fri, 27 Sep 2024 11:44:27 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id PiRcldGOpCg0-KVhjKKYe; Fri, 27 Sep 2024 11:44:26 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1727426666; bh=zSKi1AnzASVgBVxtpNr5G9fqLSavMuXwrCOQUc3Wg58=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=US3NFJvOF1fu89k4Jw6RH2onqKEXO8v5QdIpcqkZYLYgLX9X+cUwqDvJKa/zVJrP5 uDN6/kUC+BraoBasPO8j6OMfja8VrWL6DR9esMeqqRZg9uhJCnK+6BfwY6Jcc/wEfu ryINHErAb6SDVPRuUGYRjr6TVZ1cpwmaWXOI58eM= Authentication-Results: mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Brian Norris Cc: Kalle Valo , linux-wireless@vger.kernel.org, Dmitry Antipov Subject: [PATCH 2/2] wifi: mwifiex: cleanup struct mwifiex_private Date: Fri, 27 Sep 2024 11:43:17 +0300 Message-ID: <20240927084317.96687-2-dmantipov@yandex.ru> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240927084317.96687-1-dmantipov@yandex.ru> References: <20240927084317.96687-1-dmantipov@yandex.ru> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Yandex-Filter: 1 Remove set but otherwise unused 'adhoc_is_link_sensed' and 'assoc_resp_ht_param' members of 'struct mwifiex_private' and simplify related code in 'mwifiex_ret_802_11_associate()'. Compile tested only. Fixes: 28bf8312a983 ("mwifiex: get_channel from firmware") Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Dmitry Antipov --- drivers/net/wireless/marvell/mwifiex/join.c | 11 ++--------- drivers/net/wireless/marvell/mwifiex/main.h | 2 -- drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +----- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 2 -- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/join.c b/drivers/net/wireless/marvell/mwifiex/join.c index 6d8f1d1d7ca4..5a1a0287c1d5 100644 --- a/drivers/net/wireless/marvell/mwifiex/join.c +++ b/drivers/net/wireless/marvell/mwifiex/join.c @@ -663,7 +663,6 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, bool enable_data = true; u16 cap_info, status_code, aid; const u8 *ie_ptr; - struct ieee80211_ht_operation *assoc_resp_ht_oper; if (!priv->attempted_bss_desc) { mwifiex_dbg(priv->adapter, ERROR, @@ -779,14 +778,8 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, ie_ptr = cfg80211_find_ie(WLAN_EID_HT_OPERATION, assoc_rsp->ie_buffer, priv->assoc_rsp_size - sizeof(struct ieee_types_assoc_rsp)); - if (ie_ptr) { - assoc_resp_ht_oper = (struct ieee80211_ht_operation *)(ie_ptr - + sizeof(struct ieee_types_header)); - priv->assoc_resp_ht_param = assoc_resp_ht_oper->ht_param; - priv->ht_param_present = true; - } else { - priv->ht_param_present = false; - } + + priv->ht_param_present = ie_ptr ? true : false; mwifiex_dbg(priv->adapter, INFO, "info: ASSOC_RESP: curr_pkt_filter is %#x\n", diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index 92a1cab6e750..e959906872b8 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -574,7 +574,6 @@ struct mwifiex_private { u16 listen_interval; u16 atim_window; u8 adhoc_channel; - u8 adhoc_is_link_sensed; u8 adhoc_state; struct mwifiex_802_11_security sec_info; struct mwifiex_wep_key wep_key[NUM_WEP_KEYS]; @@ -683,7 +682,6 @@ struct mwifiex_private { struct mwifiex_ds_mem_rw mem_rw; struct sk_buff_head bypass_txq; struct mwifiex_user_scan_chan hidden_chan[MWIFIEX_USER_SCAN_CHAN_MAX]; - u8 assoc_resp_ht_param; bool ht_param_present; }; diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c index b5f3821a6a8f..400348abeee5 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_event.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c @@ -177,17 +177,14 @@ void mwifiex_reset_connect_state(struct mwifiex_private *priv, u16 reason_code, priv->is_data_rate_auto = true; priv->data_rate = 0; - priv->assoc_resp_ht_param = 0; priv->ht_param_present = false; if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA || GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) && priv->hist_data) mwifiex_hist_data_reset(priv); - if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { + if (priv->bss_mode == NL80211_IFTYPE_ADHOC) priv->adhoc_state = ADHOC_IDLE; - priv->adhoc_is_link_sensed = false; - } /* * Memorize the previous SSID and BSSID so @@ -843,7 +840,6 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) case EVENT_ADHOC_BCN_LOST: mwifiex_dbg(adapter, EVENT, "event: ADHOC_BCN_LOST\n"); - priv->adhoc_is_link_sensed = false; mwifiex_clean_txrx(priv); mwifiex_stop_net_dev_queue(priv->netdev, adapter); if (netif_carrier_ok(priv->netdev)) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index d3cba6895f8c..e06a0622973e 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -351,8 +351,6 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, goto done; } - priv->adhoc_is_link_sensed = false; - ret = mwifiex_check_network_compatibility(priv, bss_desc); mwifiex_stop_net_dev_queue(priv->netdev, adapter);