staging: rtl8192e: Remove unused timer beacon_timer
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Fri, 24 Nov 2023 21:30:47 +0000 (22:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Nov 2023 10:27:49 +0000 (10:27 +0000)
Driver does not support AP Mode therefore no beacons need to be send.
Remove unused timer beacon_timer.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b16b6b4525ede8e2a218cb39d23f9ef2a3a745a9.1700860759.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_softmac.c

index 835b407ab1806a2eef48c48e3b38b8b836fe690c..b7f4d7e2ea263e94e2b58a34ef81642aa87fd36f 100644 (file)
@@ -1418,7 +1418,6 @@ struct rtllib_device {
        struct timer_list associate_timer;
 
        /* used if IEEE_SOFTMAC_BEACONS is set */
-       struct timer_list beacon_timer;
        u8 need_sw_enc;
        struct work_struct associate_complete_wq;
        struct work_struct ips_leave_wq;
index 0ad08165fd852332ed059849605a40b96858d49d..430951c88123a9abe670560a1c6b8d2fad843d6c 100644 (file)
@@ -365,21 +365,6 @@ static void rtllib_send_beacon(struct rtllib_device *ieee)
                softmac_mgmt_xmit(skb, ieee);
                ieee->softmac_stats.tx_beacons++;
        }
-
-       if (ieee->beacon_txing && ieee->ieee_up)
-               mod_timer(&ieee->beacon_timer, jiffies +
-                         (msecs_to_jiffies(ieee->current_network.beacon_interval - 5)));
-}
-
-static void rtllib_send_beacon_cb(struct timer_list *t)
-{
-       struct rtllib_device *ieee =
-               from_timer(ieee, t, beacon_timer);
-       unsigned long flags;
-
-       spin_lock_irqsave(&ieee->beacon_lock, flags);
-       rtllib_send_beacon(ieee);
-       spin_unlock_irqrestore(&ieee->beacon_lock, flags);
 }
 
 /* Enables network monitor mode, all rx packets will be received. */
@@ -2328,8 +2313,6 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
 
        timer_setup(&ieee->associate_timer, rtllib_associate_abort_cb, 0);
 
-       timer_setup(&ieee->beacon_timer, rtllib_send_beacon_cb, 0);
-
        INIT_DELAYED_WORK(&ieee->link_change_wq, (void *)rtllib_link_change_wq);
        INIT_WORK(&ieee->associate_complete_wq, (void *)rtllib_associate_complete_wq);
        INIT_DELAYED_WORK(&ieee->associate_procedure_wq, (void *)rtllib_associate_procedure_wq);