summaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-02-14 14:50:34 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2023-02-18 16:47:26 +0100
commit61d7dddf46caa1c6dd869385a275e4d2931e7090 (patch)
treeebefb095c6ef91e7033024bdee9ea248e969bef1 /net/mac802154
parentmac802154: Send beacons using the MLME Tx path (diff)
downloadlinux-61d7dddf46caa1c6dd869385a275e4d2931e7090.tar.xz
linux-61d7dddf46caa1c6dd869385a275e4d2931e7090.zip
mac802154: Fix an always true condition
At this stage we simply do not care about the delayed work value, because active scan is not yet supported, so we can blindly queue another work once a beacon has been sent. It fixes a smatch warning: mac802154_beacon_worker() warn: always true condition '(local->beacon_interval >= 0) => (0-u32max >= 0)' Fixes: 3accf4762734 ("mac802154: Handle basic beaconing") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20230214135035.1202471-6-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/scan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c
index fff41e59099e..9b0933a185eb 100644
--- a/net/mac802154/scan.c
+++ b/net/mac802154/scan.c
@@ -383,9 +383,8 @@ void mac802154_beacon_worker(struct work_struct *work)
dev_err(&sdata->dev->dev,
"Beacon could not be transmitted (%d)\n", ret);
- if (local->beacon_interval >= 0)
- queue_delayed_work(local->mac_wq, &local->beacon_work,
- local->beacon_interval);
+ queue_delayed_work(local->mac_wq, &local->beacon_work,
+ local->beacon_interval);
}
int mac802154_stop_beacons_locked(struct ieee802154_local *local,