nl80211: use correct enum type in reg_reload_regdb
Subsystems (3)
PATCH 1/1 nl80211: use correct enum type in reg_reload_regdb
From: Arnd Bergmann <[email protected]>
NL80211_USER_REG_HINT_USER is not something that can be assigned to an 'enum nl80211_reg_initiator', as pointed out by gcc.
net/wireless/reg.c: In function 'reg_reload_regdb':net/wireless/reg.c:1137:28: error: implicit conversion from 'enum nl80211_user_reg_hint_type' to 'enum nl80211_reg_initiator' [-Werror=enum-conversion]
I don't know what was intended here, most likely it was either NL80211_REGDOM_SET_BY_CORE (same numeric value) or NL80211_REGDOM_SET_BY_USER (most similar name), so I pick the former here, leaving the behavior unchanged while avoiding the warning.
--- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/reg.c +1 -1
@@ -1134,7 +1134,7 @@ int reg_reload_regdb(void) request->wiphy_idx =WIPHY_IDX_INVALID ; request->alpha2[0 ] = current_regdomain->alpha2[0 ]; request->alpha2[1 ] = current_regdomain->alpha2[1 ]; - request->initiator =NL80211_USER_REG_HINT_USER ; + request->initiator =NL80211_REGDOM_SET_BY_CORE ; request->user_reg_hint_type =NL80211_USER_REG_HINT_USER ; request->reload = true;
Signature · 1 line
2.29.2
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
NL80211_USER_REG_HINT_USERis not something that can be assigned to an 'enumnl80211_reg_initiator', as pointed out by gcc.
net/wireless/reg.c: In function 'reg_reload_regdb':net/wireless/reg.c:1137:28: error: implicit conversion from 'enumnl80211_user_reg_hint_type' to 'enumnl80211_reg_initiator' [-Werror=enum-conversion]
Quoted 8 lines
I don't know what was intended here, most likely it was either
NL80211_REGDOM_SET_BY_CORE(same numeric value) orNL80211_REGDOM_SET_BY_USER(most similar name), so I pick the former here, leaving the behavior unchanged while avoiding the warning.Fixes 1eda919126b4 ("nl80211: reset regdom when reloading regdb")Signed-off-by Arnd Bergmann <[email protected]>---
Thanks,
I did miss it somehow, but after Intels robot mail about it, I did write a proper patch, as this is a different value as I wanted for the original proposed patch. But It works better this way. See https://lore.kernel.org/linux-wireless/YadvTolO8rQcNCd%[email protected]/
Cheers,
Finn
Quoted 19 lines
net/wireless/reg.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)net/wireless/reg.c +1
-1@@ -1134,7 +1134,7 @@ int reg_reload_regdb(void) request->wiphy_idx =WIPHY_IDX_INVALID ; request->alpha2[0 ] = current_regdomain->alpha2[0 ]; request->alpha2[1 ] = current_regdomain->alpha2[1 ]; - request->initiator =NL80211_USER_REG_HINT_USER ; + request->initiator =NL80211_REGDOM_SET_BY_CORE ; request->user_reg_hint_type =NL80211_USER_REG_HINT_USER ; request->reload = true;Signature · 1 line
2.29.2