From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Kalle Valo" <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Subject: [PATCH 07/16] staging: wfx: field operational_rate_set is ignored by firmware
Date: Mon, 20 Apr 2020 18:03:02 +0200 [thread overview]
Message-ID: <20200420160311.57323-8-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com>
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
The field bss_params.operational_rate_set is ignore by the firmware. It
is not necessary to send it. This change greatly simplify
wfx_join_finalize(). It is no more necessary to get sta and it allow to
save a RCU.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
drivers/staging/wfx/sta.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 2a9c7f28d934..6cdb40a05991 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -470,22 +470,12 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
static void wfx_join_finalize(struct wfx_vif *wvif,
struct ieee80211_bss_conf *info)
{
- struct ieee80211_sta *sta = NULL;
- struct hif_req_set_bss_params bss_params = { };
-
- rcu_read_lock(); // protect sta
- if (info->bssid && !info->ibss_joined)
- sta = ieee80211_find_sta(wvif->vif, info->bssid);
- if (sta)
- bss_params.operational_rate_set =
- wfx_rate_mask_to_hw(wvif->wdev, sta->supp_rates[wvif->channel->band]);
- else
- bss_params.operational_rate_set = -1;
- rcu_read_unlock();
- // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use
- // the same value.
- bss_params.beacon_lost_count = 7;
- bss_params.aid = info->aid;
+ struct hif_req_set_bss_params bss_params = {
+ // beacon_loss_count is defined to 7 in net/mac80211/mlme.c.
+ // Let's use the same value.
+ .beacon_lost_count = 7,
+ .aid = info->aid,
+ };
hif_set_association_mode(wvif, info);
hif_keep_alive_period(wvif, 0);
--
2.26.1
next prev parent reply other threads:[~2020-04-20 16:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 16:02 [PATCH 00/16] staging: wfx: rework the handling of the connection loss Jerome Pouiller
2020-04-20 16:02 ` [PATCH 01/16] staging: wfx: simplify the check if the the device is associated Jerome Pouiller
2020-04-20 16:02 ` [PATCH 02/16] staging: wfx: use ieee80211_beacon_loss() provided by mac80211 Jerome Pouiller
2020-04-20 16:02 ` [PATCH 03/16] staging: wfx: drop useless attribute 'bss_params' Jerome Pouiller
2020-04-20 16:02 ` [PATCH 04/16] staging: wfx: handle firmware events synchronously Jerome Pouiller
2020-04-20 16:03 ` [PATCH 05/16] staging: wfx: also fix network parameters for IBSS networks Jerome Pouiller
2020-04-20 16:03 ` [PATCH 06/16] staging: wfx: dual CTS is never necessary Jerome Pouiller
2020-04-20 16:03 ` Jerome Pouiller [this message]
2020-04-20 16:03 ` [PATCH 08/16] staging: wfx: simplify hif_set_bss_params() Jerome Pouiller
2020-04-20 16:03 ` [PATCH 09/16] staging: wfx: drop useless update of field basic_rate_set Jerome Pouiller
2020-04-20 16:03 ` [PATCH 10/16] staging: wfx: introduce wfx_set_default_unicast_key() Jerome Pouiller
2020-04-20 16:03 ` [PATCH 11/16] staging: wfx: keys are kept during whole firmware life Jerome Pouiller
2020-04-20 16:03 ` [PATCH 12/16] staging: wfx: drop protection for asynchronous join during scan Jerome Pouiller
2020-04-20 16:03 ` [PATCH 13/16] staging: wfx: drop useless checks in wfx_do_unjoin() Jerome Pouiller
2020-04-20 16:03 ` [PATCH 14/16] staging: wfx: simplify wfx_remove_interface() Jerome Pouiller
2020-04-20 16:03 ` [PATCH 15/16] staging: wfx: drop unused enum wfx_state Jerome Pouiller
2020-04-20 16:03 ` [PATCH 16/16] staging: wfx: drop unused attribute 'join_complete_status' Jerome Pouiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200420160311.57323-8-Jerome.Pouiller@silabs.com \
--to=jerome.pouiller@silabs.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).