]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: rtl8723bs: Remove switch(type) as type is constant
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 23 Jun 2024 17:56:56 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 13:25:55 +0000 (15:25 +0200)
Remove switch(type) as type is constant and never matches any of the
cases.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1e3982de9a03e75931bf7977fca83c5402084aa4.1719155208.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

index 3fe27ee75b474208411cbc09f6f4e6e32e24925e..82722897d6ccac0177dcfbb72f4f17b855de68de 100644 (file)
@@ -2549,7 +2549,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
        bool ack = true;
        u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
        u8 category, action;
-       int type = (-1);
        struct adapter *padapter;
        struct rtw_wdev_priv *pwdev_priv;
 
@@ -2581,19 +2580,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
                tx_ret = _cfg80211_rtw_mgmt_tx(padapter, tx_ch, buf, len);
        } while (dump_cnt < dump_limit && tx_ret != _SUCCESS);
 
-       switch (type) {
-       case P2P_GO_NEGO_CONF:
-               rtw_clear_scan_deny(padapter);
-               break;
-       case P2P_INVIT_RESP:
-               if (pwdev_priv->invit_info.flags & BIT(0) && pwdev_priv->invit_info.status == 0) {
-                       rtw_set_scan_deny(padapter, 5000);
-                       rtw_pwr_wakeup_ex(padapter, 5000);
-                       rtw_clear_scan_deny(padapter);
-               }
-               break;
-       }
-
 cancel_ps_deny:
        rtw_ps_deny_cancel(padapter, PS_DENY_MGNT_TX);
 exit: