projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
[platform/kernel/linux-starfive.git]
/
net
/
mac80211
/
cfg.c
diff --git
a/net/mac80211/cfg.c
b/net/mac80211/cfg.c
index
0e3a175
..
715da61
100644
(file)
--- a/
net/mac80211/cfg.c
+++ b/
net/mac80211/cfg.c
@@
-3121,6
+3121,10
@@
static int ieee80211_get_tx_power(struct wiphy *wiphy,
else
*dbm = sdata->vif.bss_conf.txpower;
+ /* INT_MIN indicates no power level was set yet */
+ if (*dbm == INT_MIN)
+ return -EINVAL;
+
return 0;
}