From 0ba9c167b7c7e0ccf7ee562a531ecb382fc93d05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Fri, 10 Apr 2020 15:32:30 +0200 Subject: [PATCH] staging: wfx: drop unnecessary condition checks in wfx_upload_ap_templates() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.kernel.org/r/20200410133239.438347-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- 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 b0557dab91fda..7af7bfa4ac991 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.39.5