FIX: [wext] do not show INT_MIN as txpower value if nothing was configured
BugzId: 72713
This commit is contained in:
parent
4fb2e1d93b
commit
dc032ec273
|
|
@ -649,3 +649,17 @@ index b6caa2b..fbe581a 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_band_custom(struct wiphy *wiphy,
|
static void handle_band_custom(struct wiphy *wiphy,
|
||||||
|
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
||||||
|
index 78f2927..4fa5b0d 100644
|
||||||
|
--- a/net/wireless/wext-compat.c
|
||||||
|
+++ b/net/wireless/wext-compat.c
|
||||||
|
@@ -895,7 +895,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||||
|
/* well... oh well */
|
||||||
|
data->txpower.fixed = 1;
|
||||||
|
data->txpower.disabled = rfkill_blocked(rdev->rfkill);
|
||||||
|
- data->txpower.value = val;
|
||||||
|
+ /* show same behavior as iw and show txpower 0dBm if not initialized */
|
||||||
|
+ data->txpower.value = val == INT_MIN ? 0 : val;
|
||||||
|
data->txpower.flags = IW_TXPOW_DBM;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue