summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-22 10:17:23 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:14 +0200
commit23cc6d8c37cdbe3b2b74a922f3311ecb2a5aea6c (patch)
tree9e6df1c6d5f6340dc5ec659baa21237ed494801f /include/net/cfg80211.h
parentwifi: nl80211: enable setting the link address at new station (diff)
downloadlinux-23cc6d8c37cdbe3b2b74a922f3311ecb2a5aea6c.tar.xz
linux-23cc6d8c37cdbe3b2b74a922f3311ecb2a5aea6c.zip
wifi: cfg80211: make cfg80211_auth_request::key_idx signed
We might assign -1 to it in some cases when key is NULL, which means the key_idx isn't used but can lead to a warning from static checkers such as smatch. Make the struct member signed simply to avoid that, we only need a range of -1..3 anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c904cbd1c4d6..a4e2cb2378b8 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2773,7 +2773,8 @@ struct cfg80211_auth_request {
size_t ie_len;
enum nl80211_auth_type auth_type;
const u8 *key;
- u8 key_len, key_idx;
+ u8 key_len;
+ s8 key_idx;
const u8 *auth_data;
size_t auth_data_len;
s8 link_id;