Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: cfg80211: stop exporting wext symbols

CFG80211_WEXT_EXPORT is no longer needed, if we only make
ipw2200 return the static name for SIOCGIWNAME itself.

Link: https://patch.msgid.link/20241007211431.8d4a7242ce92.I66ceb885ddfa52c368feeea1ea884bf988c525f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+10 -27
-1
drivers/net/wireless/intel/ipw2x00/Kconfig
··· 65 65 config IPW2200 66 66 tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection" 67 67 depends on PCI && CFG80211 68 - select CFG80211_WEXT_EXPORT 69 68 select WIRELESS_EXT 70 69 select WEXT_PRIV 71 70 select FW_LOADER
+9 -1
drivers/net/wireless/intel/ipw2x00/ipw2200.c
··· 6463 6463 * WE-18 support 6464 6464 */ 6465 6465 6466 + static int ipw_wx_get_name(struct net_device *dev, 6467 + struct iw_request_info *info, 6468 + union iwreq_data *wrqu, char *extra) 6469 + { 6470 + strcpy(wrqu->name, "IEEE 802.11"); 6471 + return 0; 6472 + } 6473 + 6466 6474 /* SIOCSIWGENIE */ 6467 6475 static int ipw_wx_set_genie(struct net_device *dev, 6468 6476 struct iw_request_info *info, ··· 9834 9826 9835 9827 /* Rebase the WE IOCTLs to zero for the handler array */ 9836 9828 static iw_handler ipw_wx_handlers[] = { 9837 - IW_HANDLER(SIOCGIWNAME, cfg80211_wext_giwname), 9829 + IW_HANDLER(SIOCGIWNAME, ipw_wx_get_name), 9838 9830 IW_HANDLER(SIOCSIWFREQ, ipw_wx_set_freq), 9839 9831 IW_HANDLER(SIOCGIWFREQ, ipw_wx_get_freq), 9840 9832 IW_HANDLER(SIOCSIWMODE, ipw_wx_set_mode),
+1 -8
net/wireless/Kconfig
··· 185 185 If unsure, say Y. 186 186 187 187 config CFG80211_WEXT 188 - bool "cfg80211 wireless extensions compatibility" if !CFG80211_WEXT_EXPORT 188 + bool "cfg80211 wireless extensions compatibility" 189 189 select WEXT_CORE 190 - default y if CFG80211_WEXT_EXPORT 191 190 help 192 191 Enable this option if you need old userspace for wireless 193 192 extensions with cfg80211-based drivers. 194 - 195 - config CFG80211_WEXT_EXPORT 196 - bool 197 - help 198 - Drivers should select this option if they require cfg80211's 199 - wext compatibility symbols to be exported. 200 193 201 194 config CFG80211_KUNIT_TEST 202 195 tristate "KUnit tests for cfg80211" if !KUNIT_ALL_TESTS
-2
net/wireless/scan.c
··· 3594 3594 kfree(creq); 3595 3595 return err; 3596 3596 } 3597 - EXPORT_WEXT_HANDLER(cfg80211_wext_siwscan); 3598 3597 3599 3598 static char *ieee80211_scan_add_ies(struct iw_request_info *info, 3600 3599 const struct cfg80211_bss_ies *ies, ··· 3965 3966 3966 3967 return res; 3967 3968 } 3968 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwscan); 3969 3969 #endif
-9
net/wireless/wext-compat.c
··· 30 30 strcpy(wrqu->name, "IEEE 802.11"); 31 31 return 0; 32 32 } 33 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwname); 34 33 35 34 int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info, 36 35 union iwreq_data *wrqu, char *extra) ··· 68 69 69 70 return ret; 70 71 } 71 - EXPORT_WEXT_HANDLER(cfg80211_wext_siwmode); 72 72 73 73 int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info, 74 74 union iwreq_data *wrqu, char *extra) ··· 103 105 } 104 106 return 0; 105 107 } 106 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwmode); 107 108 108 109 109 110 int cfg80211_wext_giwrange(struct net_device *dev, ··· 217 220 218 221 return 0; 219 222 } 220 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwrange); 221 223 222 224 223 225 /** ··· 277 281 wiphy_unlock(&rdev->wiphy); 278 282 return err; 279 283 } 280 - EXPORT_WEXT_HANDLER(cfg80211_wext_siwrts); 281 284 282 285 int cfg80211_wext_giwrts(struct net_device *dev, 283 286 struct iw_request_info *info, ··· 291 296 292 297 return 0; 293 298 } 294 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwrts); 295 299 296 300 int cfg80211_wext_siwfrag(struct net_device *dev, 297 301 struct iw_request_info *info, ··· 321 327 322 328 return err; 323 329 } 324 - EXPORT_WEXT_HANDLER(cfg80211_wext_siwfrag); 325 330 326 331 int cfg80211_wext_giwfrag(struct net_device *dev, 327 332 struct iw_request_info *info, ··· 335 342 336 343 return 0; 337 344 } 338 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwfrag); 339 345 340 346 static int cfg80211_wext_siwretry(struct net_device *dev, 341 347 struct iw_request_info *info, ··· 405 413 406 414 return 0; 407 415 } 408 - EXPORT_WEXT_HANDLER(cfg80211_wext_giwretry); 409 416 410 417 static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev, 411 418 struct net_device *dev, bool pairwise,
-6
net/wireless/wext-compat.h
··· 5 5 #include <net/iw_handler.h> 6 6 #include <linux/wireless.h> 7 7 8 - #ifdef CONFIG_CFG80211_WEXT_EXPORT 9 - #define EXPORT_WEXT_HANDLER(h) EXPORT_SYMBOL_GPL(h) 10 - #else 11 - #define EXPORT_WEXT_HANDLER(h) 12 - #endif /* CONFIG_CFG80211_WEXT_EXPORT */ 13 - 14 8 int cfg80211_ibss_wext_siwfreq(struct net_device *dev, 15 9 struct iw_request_info *info, 16 10 struct iw_freq *wextfreq, char *extra);