lkml.org 
[lkml]   [2020]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/19] staging: wfx: drop unnecessary condition checks in wfx_upload_ap_templates()
Date
From: Jérôme Pouiller <jerome.pouiller@silabs.com>

In former code, wfx_upload_ap_templates() was called in more cases
than necessary. Therefore, it tried to not update the frame templates
if it was not necessary.

Now, wfx_upload_ap_templates() is called only if mac80211 asked to
update the templates. In add, it does not hurt to upload template if
they are not used. So, remove unnecessary conditions at beginning of
wfx_upload_ap_templates()

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
drivers/staging/wfx/sta.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index b0557dab91fd..7af7bfa4ac99 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -570,11 +570,6 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif)
{
struct sk_buff *skb;

- if (wvif->vif->type == NL80211_IFTYPE_STATION ||
- wvif->vif->type == NL80211_IFTYPE_MONITOR ||
- wvif->vif->type == NL80211_IFTYPE_UNSPECIFIED)
- return 0;
-
skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif);
if (!skb)
return -ENOMEM;
--
2.25.1
\
 
 \ /
  Last update: 2020-04-10 15:34    [W:0.123 / U:2.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site