diff mbox series

[7/8] mac80211: remove WDS-related code

Message ID 20201109105103.38960c413d46.I3603c90a44562d847c39d15d5ff33d8c00df5834@changeid (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series wireless: remove WDS mode | expand

Commit Message

Johannes Berg Nov. 9, 2020, 9:57 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Now that all the mac80211-based drivers have removed WDS code
and in particular the ability to advertise such devices, also
remove all the code related to WDS here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/cfg.c            | 11 --------
 net/mac80211/chan.c           |  3 +--
 net/mac80211/debugfs_netdev.c | 11 --------
 net/mac80211/ieee80211_i.h    |  6 -----
 net/mac80211/iface.c          | 50 ++++-------------------------------
 net/mac80211/main.c           |  8 ------
 net/mac80211/pm.c             | 15 -----------
 net/mac80211/rx.c             |  5 ----
 net/mac80211/tx.c             | 26 ++----------------
 net/mac80211/util.c           |  2 +-
 net/mac80211/wme.c            |  3 ---
 11 files changed, 9 insertions(+), 131 deletions(-)

Comments

kernel test robot Nov. 10, 2020, 4:58 a.m. UTC | #1
Hi Johannes,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master wireless-drivers-next/master v5.10-rc3 next-20201109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Johannes-Berg/wireless-remove-CONFIG_WIRELESS_WDS/20201109-175921
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: sparc-randconfig-r016-20201109 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/c57a74c8fb0ee0e2f65123e27dff3c4887fd9c07
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Johannes-Berg/wireless-remove-CONFIG_WIRELESS_WDS/20201109-175921
        git checkout c57a74c8fb0ee0e2f65123e27dff3c4887fd9c07
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   net/mac80211/iface.c: In function 'ieee80211_do_open':
   net/mac80211/iface.c:1015:19: warning: unused variable 'sta' [-Wunused-variable]
    1015 |  struct sta_info *sta;
         |                   ^~~
   net/mac80211/iface.c: In function 'ieee80211_setup_sdata':
>> net/mac80211/iface.c:1507:2: warning: enumeration value 'NL80211_IFTYPE_WDS' not handled in switch [-Wswitch]
    1507 |  switch (type) {
         |  ^~~~~~

vim +/NL80211_IFTYPE_WDS +1507 net/mac80211/iface.c

1fa57d017366fb2 net/mac80211/iface.c           Johannes Berg       2010-06-10  1466  
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1467  /*
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1468   * Helper function to initialise an interface to a specific type.
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1469   */
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1470  static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1471  				  enum nl80211_iftype type)
f0706e828e96d0f net/mac80211/ieee80211_iface.c Jiri Benc           2007-05-05  1472  {
239281f803e2efd net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1473  	static const u8 bssid_wildcard[ETH_ALEN] = {0xff, 0xff, 0xff,
239281f803e2efd net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1474  						    0xff, 0xff, 0xff};
239281f803e2efd net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1475  
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1476  	/* clear type-dependent union */
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1477  	memset(&sdata->u, 0, sizeof(sdata->u));
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1478  
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1479  	/* and set some type-dependent values */
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1480  	sdata->vif.type = type;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1481  	sdata->vif.p2p = false;
60719ffd721f676 net/mac80211/iface.c           Johannes Berg       2008-09-16  1482  	sdata->wdev.iftype = type;
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1483  
a621fa4d6a7fdf9 net/mac80211/iface.c           Johannes Berg       2010-08-27  1484  	sdata->control_port_protocol = cpu_to_be16(ETH_P_PAE);
a621fa4d6a7fdf9 net/mac80211/iface.c           Johannes Berg       2010-08-27  1485  	sdata->control_port_no_encrypt = false;
7f3f96cedd79e36 net/mac80211/iface.c           Markus Theil        2020-03-12  1486  	sdata->control_port_over_nl80211 = false;
7f3f96cedd79e36 net/mac80211/iface.c           Markus Theil        2020-03-12  1487  	sdata->control_port_no_preauth = false;
2475b1cc0d5283a net/mac80211/iface.c           Max Stepanov        2013-03-24  1488  	sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM;
d3a58df87a2e4c2 net/mac80211/iface.c           Avraham Stern       2014-05-22  1489  	sdata->vif.bss_conf.idle = true;
db6d9e9e8b48b7a net/mac80211/iface.c           Ben Greear          2019-12-17  1490  	sdata->vif.bss_conf.txpower = INT_MIN; /* unset */
a621fa4d6a7fdf9 net/mac80211/iface.c           Johannes Berg       2010-08-27  1491  
b53be7920bd9bb1 net/mac80211/iface.c           Simon Wunderlich    2011-11-18  1492  	sdata->noack_map = 0;
b53be7920bd9bb1 net/mac80211/iface.c           Simon Wunderlich    2011-11-18  1493  
f142c6b906da451 net/mac80211/iface.c           Johannes Berg       2012-06-18  1494  	/* only monitor/p2p-device differ */
f142c6b906da451 net/mac80211/iface.c           Johannes Berg       2012-06-18  1495  	if (sdata->dev) {
f142c6b906da451 net/mac80211/iface.c           Johannes Berg       2012-06-18  1496  		sdata->dev->netdev_ops = &ieee80211_dataif_ops;
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1497  		sdata->dev->type = ARPHRD_ETHER;
f142c6b906da451 net/mac80211/iface.c           Johannes Berg       2012-06-18  1498  	}
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1499  
35f20c14a103ca2 net/mac80211/iface.c           Johannes Berg       2010-06-10  1500  	skb_queue_head_init(&sdata->skb_queue);
1fa57d017366fb2 net/mac80211/iface.c           Johannes Berg       2010-06-10  1501  	INIT_WORK(&sdata->work, ieee80211_iface_work);
04ecd2578e712c3 net/mac80211/iface.c           Johannes Berg       2012-09-11  1502  	INIT_WORK(&sdata->recalc_smps, ieee80211_recalc_smps_work);
73da7d5bab79ad7 net/mac80211/iface.c           Simon Wunderlich    2013-07-11  1503  	INIT_WORK(&sdata->csa_finalize_work, ieee80211_csa_finalize_work);
484298ad1afaf24 net/mac80211/iface.c           Michal Kazior       2014-04-09  1504  	INIT_LIST_HEAD(&sdata->assigned_chanctx_list);
e3afb920227d37f net/mac80211/iface.c           Michal Kazior       2014-04-09  1505  	INIT_LIST_HEAD(&sdata->reserved_chanctx_list);
35f20c14a103ca2 net/mac80211/iface.c           Johannes Berg       2010-06-10  1506  
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09 @1507  	switch (type) {
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1508  	case NL80211_IFTYPE_P2P_GO:
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1509  		type = NL80211_IFTYPE_AP;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1510  		sdata->vif.type = type;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1511  		sdata->vif.p2p = true;
fc0561dc6a9c616 net/mac80211/iface.c           Gustavo A. R. Silva 2020-07-07  1512  		fallthrough;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1513  	case NL80211_IFTYPE_AP:
d012a605108a482 net/mac80211/iface.c           Marco Porsch        2012-10-10  1514  		skb_queue_head_init(&sdata->u.ap.ps.bc_buf);
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1515  		INIT_LIST_HEAD(&sdata->u.ap.vlans);
ad2d223aa900179 net/mac80211/iface.c           Johannes Berg       2012-12-14  1516  		sdata->vif.bss_conf.bssid = sdata->vif.addr;
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1517  		break;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1518  	case NL80211_IFTYPE_P2P_CLIENT:
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1519  		type = NL80211_IFTYPE_STATION;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1520  		sdata->vif.type = type;
2ca27bcff7127da net/mac80211/iface.c           Johannes Berg       2010-09-16  1521  		sdata->vif.p2p = true;
fc0561dc6a9c616 net/mac80211/iface.c           Gustavo A. R. Silva 2020-07-07  1522  		fallthrough;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1523  	case NL80211_IFTYPE_STATION:
ad2d223aa900179 net/mac80211/iface.c           Johannes Berg       2012-12-14  1524  		sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
9c6bd79011b14a8 net/mac80211/iface.c           Johannes Berg       2008-09-11  1525  		ieee80211_sta_setup_sdata(sdata);
472dbc45dc19662 net/mac80211/iface.c           Johannes Berg       2008-09-11  1526  		break;
6e0bd6c35b021dc net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1527  	case NL80211_IFTYPE_OCB:
239281f803e2efd net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1528  		sdata->vif.bss_conf.bssid = bssid_wildcard;
239281f803e2efd net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1529  		ieee80211_ocb_setup_sdata(sdata);
6e0bd6c35b021dc net/mac80211/iface.c           Rostislav Lisovy    2014-11-03  1530  		break;
469002983fc90c2 net/mac80211/iface.c           Johannes Berg       2009-02-15  1531  	case NL80211_IFTYPE_ADHOC:
ad2d223aa900179 net/mac80211/iface.c           Johannes Berg       2012-12-14  1532  		sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
469002983fc90c2 net/mac80211/iface.c           Johannes Berg       2009-02-15  1533  		ieee80211_ibss_setup_sdata(sdata);
469002983fc90c2 net/mac80211/iface.c           Johannes Berg       2009-02-15  1534  		break;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1535  	case NL80211_IFTYPE_MESH_POINT:
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1536  		if (ieee80211_vif_is_mesh(&sdata->vif))
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1537  			ieee80211_mesh_init_sdata(sdata);
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1538  		break;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1539  	case NL80211_IFTYPE_MONITOR:
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1540  		sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
587e729ecff9594 net/mac80211/iface.c           Johannes Berg       2009-01-30  1541  		sdata->dev->netdev_ops = &ieee80211_monitorif_ops;
d82121845d44334 net/mac80211/iface.c           Aviya Erenfeld      2016-08-29  1542  		sdata->u.mntr.flags = MONITOR_FLAG_CONTROL |
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1543  				      MONITOR_FLAG_OTHER_BSS;
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1544  		break;
167e33f4f68cc8e net/mac80211/iface.c           Ayala Beker         2016-09-20  1545  	case NL80211_IFTYPE_NAN:
167e33f4f68cc8e net/mac80211/iface.c           Ayala Beker         2016-09-20  1546  		idr_init(&sdata->u.nan.function_inst_ids);
167e33f4f68cc8e net/mac80211/iface.c           Ayala Beker         2016-09-20  1547  		spin_lock_init(&sdata->u.nan.func_lock);
167e33f4f68cc8e net/mac80211/iface.c           Ayala Beker         2016-09-20  1548  		sdata->vif.bss_conf.bssid = sdata->vif.addr;
167e33f4f68cc8e net/mac80211/iface.c           Ayala Beker         2016-09-20  1549  		break;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1550  	case NL80211_IFTYPE_AP_VLAN:
98104fdeda63d57 net/mac80211/iface.c           Johannes Berg       2012-06-16  1551  	case NL80211_IFTYPE_P2P_DEVICE:
ad2d223aa900179 net/mac80211/iface.c           Johannes Berg       2012-12-14  1552  		sdata->vif.bss_conf.bssid = sdata->vif.addr;
f142c6b906da451 net/mac80211/iface.c           Johannes Berg       2012-06-18  1553  		break;
05c914fe330fa8e net/mac80211/iface.c           Johannes Berg       2008-09-11  1554  	case NL80211_IFTYPE_UNSPECIFIED:
2e161f78e5f63a7 net/mac80211/iface.c           Johannes Berg       2010-08-12  1555  	case NUM_NL80211_IFTYPES:
c7976f5272486e4 net/mac80211/iface.c           Luca Coelho         2017-10-29  1556  		WARN_ON(1);
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1557  		break;
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1558  	}
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1559  
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1560  	ieee80211_debugfs_add_netdev(sdata);
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1561  }
75636525fbfa78f net/mac80211/iface.c           Johannes Berg       2008-07-09  1562  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7276e66ae435..454432ced0c9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2708,16 +2708,6 @@  static int ieee80211_get_tx_power(struct wiphy *wiphy,
 	return 0;
 }
 
-static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
-				  const u8 *addr)
-{
-	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
-	memcpy(&sdata->u.wds.remote_addr, addr, ETH_ALEN);
-
-	return 0;
-}
-
 static void ieee80211_rfkill_poll(struct wiphy *wiphy)
 {
 	struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -4138,7 +4128,6 @@  const struct cfg80211_ops mac80211_config_ops = {
 	.set_wiphy_params = ieee80211_set_wiphy_params,
 	.set_tx_power = ieee80211_set_tx_power,
 	.get_tx_power = ieee80211_get_tx_power,
-	.set_wds_peer = ieee80211_set_wds_peer,
 	.rfkill_poll = ieee80211_rfkill_poll,
 	CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
 	CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 8f48aff74c7b..b6c80a45b9f5 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -275,11 +275,11 @@  ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local,
 		case NL80211_IFTYPE_NAN:
 			continue;
 		case NL80211_IFTYPE_ADHOC:
-		case NL80211_IFTYPE_WDS:
 		case NL80211_IFTYPE_MESH_POINT:
 		case NL80211_IFTYPE_OCB:
 			width = vif->bss_conf.chandef.width;
 			break;
+		case NL80211_IFTYPE_WDS:
 		case NL80211_IFTYPE_UNSPECIFIED:
 		case NUM_NL80211_IFTYPES:
 		case NL80211_IFTYPE_MONITOR:
@@ -743,7 +743,6 @@  void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
 			continue;
 		case NL80211_IFTYPE_AP:
 		case NL80211_IFTYPE_ADHOC:
-		case NL80211_IFTYPE_WDS:
 		case NL80211_IFTYPE_MESH_POINT:
 		case NL80211_IFTYPE_OCB:
 			break;
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index fe8a7a87e513..9fc8ce214322 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -574,9 +574,6 @@  static ssize_t ieee80211_if_parse_tsf(
 IEEE80211_IF_FILE_RW(tsf);
 
 
-/* WDS attributes */
-IEEE80211_IF_FILE(peer, u.wds.remote_addr, MAC);
-
 #ifdef CONFIG_MAC80211_MESH
 IEEE80211_IF_FILE(estab_plinks, u.mesh.estab_plinks, ATOMIC);
 
@@ -701,11 +698,6 @@  static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
 	DEBUGFS_ADD_MODE(tsf, 0600);
 }
 
-static void add_wds_files(struct ieee80211_sub_if_data *sdata)
-{
-	DEBUGFS_ADD(peer);
-}
-
 #ifdef CONFIG_MAC80211_MESH
 
 static void add_mesh_files(struct ieee80211_sub_if_data *sdata)
@@ -805,9 +797,6 @@  static void add_files(struct ieee80211_sub_if_data *sdata)
 	case NL80211_IFTYPE_AP_VLAN:
 		add_vlan_files(sdata);
 		break;
-	case NL80211_IFTYPE_WDS:
-		add_wds_files(sdata);
-		break;
 	default:
 		break;
 	}
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 2a21226fb518..bb56fdd0db81 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -311,11 +311,6 @@  struct ieee80211_if_ap {
 	bool multicast_to_unicast;
 };
 
-struct ieee80211_if_wds {
-	struct sta_info *sta;
-	u8 remote_addr[ETH_ALEN];
-};
-
 struct ieee80211_if_vlan {
 	struct list_head list; /* write-protected with RTNL and local->mtx */
 
@@ -985,7 +980,6 @@  struct ieee80211_sub_if_data {
 
 	union {
 		struct ieee80211_if_ap ap;
-		struct ieee80211_if_wds wds;
 		struct ieee80211_if_vlan vlan;
 		struct ieee80211_if_managed mgd;
 		struct ieee80211_if_ibss ibss;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 56a1bcea2c1c..51ef7a7ea93c 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -230,10 +230,6 @@  static inline int identical_mac_addr_allowed(int type1, int type2)
 		type2 == NL80211_IFTYPE_MONITOR ||
 		type1 == NL80211_IFTYPE_P2P_DEVICE ||
 		type2 == NL80211_IFTYPE_P2P_DEVICE ||
-		(type1 == NL80211_IFTYPE_AP && type2 == NL80211_IFTYPE_WDS) ||
-		(type1 == NL80211_IFTYPE_WDS &&
-			(type2 == NL80211_IFTYPE_WDS ||
-			 type2 == NL80211_IFTYPE_AP)) ||
 		(type1 == NL80211_IFTYPE_AP && type2 == NL80211_IFTYPE_AP_VLAN) ||
 		(type1 == NL80211_IFTYPE_AP_VLAN &&
 			(type2 == NL80211_IFTYPE_AP ||
@@ -417,15 +413,12 @@  static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
 	 * (because if we remove a STA after ops->remove_interface()
 	 * the driver will have removed the vif info already!)
 	 *
-	 * In WDS mode a station must exist here and be flushed, for
-	 * AP_VLANs stations may exist since there's nothing else that
+	 * For AP_VLANs stations may exist since there's nothing else that
 	 * would have removed them, but in other modes there shouldn't
 	 * be any stations.
 	 */
 	flushed = sta_info_flush(sdata);
-	WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
-		     ((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) ||
-		      (sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1)));
+	WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN && flushed > 0);
 
 	/* don't count this interface for allmulti while it is down */
 	if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
@@ -552,8 +545,7 @@  static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
 		 * When we get here, the interface is marked down.
 		 * Free the remaining keys, if there are any
 		 * (which can happen in AP mode if userspace sets
-		 * keys before the interface is operating, and maybe
-		 * also in WDS mode)
+		 * keys before the interface is operating)
 		 *
 		 * Force the key freeing to always synchronize_net()
 		 * to wait for the RX path in case it is using this
@@ -1026,10 +1018,6 @@  int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
 	u32 hw_reconf_flags = 0;
 
 	switch (sdata->vif.type) {
-	case NL80211_IFTYPE_WDS:
-		if (!is_valid_ether_addr(sdata->u.wds.remote_addr))
-			return -ENOLINK;
-		break;
 	case NL80211_IFTYPE_AP_VLAN: {
 		struct ieee80211_sub_if_data *master;
 
@@ -1078,6 +1066,7 @@  int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
 	case NUM_NL80211_IFTYPES:
 	case NL80211_IFTYPE_P2P_CLIENT:
 	case NL80211_IFTYPE_P2P_GO:
+	case NL80211_IFTYPE_WDS:
 		/* cannot happen */
 		WARN_ON(1);
 		break;
@@ -1196,7 +1185,6 @@  int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
 		case NL80211_IFTYPE_OCB:
 			netif_carrier_off(dev);
 			break;
-		case NL80211_IFTYPE_WDS:
 		case NL80211_IFTYPE_P2P_DEVICE:
 		case NL80211_IFTYPE_NAN:
 			break;
@@ -1218,28 +1206,6 @@  int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
 	set_bit(SDATA_STATE_RUNNING, &sdata->state);
 
 	switch (sdata->vif.type) {
-	case NL80211_IFTYPE_WDS:
-		/* Create STA entry for the WDS peer */
-		sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
-				     GFP_KERNEL);
-		if (!sta) {
-			res = -ENOMEM;
-			goto err_del_interface;
-		}
-
-		sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
-		sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
-		sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
-
-		res = sta_info_insert(sta);
-		if (res) {
-			/* STA has been freed */
-			goto err_del_interface;
-		}
-
-		rate_control_rate_init(sta);
-		netif_carrier_on(dev);
-		break;
 	case NL80211_IFTYPE_P2P_DEVICE:
 		rcu_assign_pointer(local->p2p_sdata, sdata);
 		break;
@@ -1576,9 +1542,6 @@  static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
 		sdata->u.mntr.flags = MONITOR_FLAG_CONTROL |
 				      MONITOR_FLAG_OTHER_BSS;
 		break;
-	case NL80211_IFTYPE_WDS:
-		sdata->vif.bss_conf.bssid = NULL;
-		break;
 	case NL80211_IFTYPE_NAN:
 		idr_init(&sdata->u.nan.function_inst_ids);
 		spin_lock_init(&sdata->u.nan.func_lock);
@@ -1633,9 +1596,7 @@  static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
 	case NL80211_IFTYPE_OCB:
 		/*
 		 * Could probably support everything
-		 * but WDS here (WDS do_open can fail
-		 * under memory pressure, which this
-		 * code isn't prepared to handle).
+		 * but here.
 		 */
 		break;
 	case NL80211_IFTYPE_P2P_CLIENT:
@@ -1728,7 +1689,6 @@  static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
 	case NL80211_IFTYPE_MONITOR:
 		/* doesn't matter */
 		break;
-	case NL80211_IFTYPE_WDS:
 	case NL80211_IFTYPE_AP_VLAN:
 		/* match up with an AP interface */
 		list_for_each_entry(sdata, &local->interfaces, list) {
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 523380aed92e..b58d588440f0 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -935,14 +935,6 @@  int ieee80211_register_hw(struct ieee80211_hw *hw)
 				return -EINVAL;
 		}
 	} else {
-		/*
-		 * WDS is currently prohibited when channel contexts are used
-		 * because there's no clear definition of which channel WDS
-		 * type interfaces use
-		 */
-		if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS))
-			return -EINVAL;
-
 		/* DFS is not supported with multi-channel combinations yet */
 		for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
 			const struct ieee80211_iface_combination *comb;
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 38c45e1dafd8..ae378a41c927 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -150,21 +150,6 @@  int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 		case NL80211_IFTYPE_STATION:
 			ieee80211_mgd_quiesce(sdata);
 			break;
-		case NL80211_IFTYPE_WDS:
-			/* tear down aggregation sessions and remove STAs */
-			mutex_lock(&local->sta_mtx);
-			sta = sdata->u.wds.sta;
-			if (sta && sta->uploaded) {
-				enum ieee80211_sta_state state;
-
-				state = sta->sta_state;
-				for (; state > IEEE80211_STA_NOTEXIST; state--)
-					WARN_ON(drv_sta_state(local, sta->sdata,
-							      sta, state,
-							      state - 1));
-			}
-			mutex_unlock(&local->sta_mtx);
-			break;
 		default:
 			break;
 		}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 09d1c9fb8872..062c2b45584e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1477,7 +1477,6 @@  ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
 	if (unlikely((ieee80211_is_data(hdr->frame_control) ||
 		      ieee80211_is_pspoll(hdr->frame_control)) &&
 		     rx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
-		     rx->sdata->vif.type != NL80211_IFTYPE_WDS &&
 		     rx->sdata->vif.type != NL80211_IFTYPE_OCB &&
 		     (!rx->sta || !test_sta_flag(rx->sta, WLAN_STA_ASSOC)))) {
 		/*
@@ -4080,10 +4079,6 @@  static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 			return false;
 
 		return true;
-	case NL80211_IFTYPE_WDS:
-		if (bssid || !ieee80211_is_data(hdr->frame_control))
-			return false;
-		return ether_addr_equal(sdata->u.wds.remote_addr, hdr->addr2);
 	case NL80211_IFTYPE_P2P_DEVICE:
 		return ieee80211_is_public_action(hdr, skb->len) ||
 		       ieee80211_is_probe_req(hdr->frame_control) ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1651cf7b2500..72f84b33a6ba 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -319,9 +319,6 @@  ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
 	if (tx->sdata->vif.type == NL80211_IFTYPE_OCB)
 		return TX_CONTINUE;
 
-	if (tx->sdata->vif.type == NL80211_IFTYPE_WDS)
-		return TX_CONTINUE;
-
 	if (tx->flags & IEEE80211_TX_PS_BUFFERED)
 		return TX_CONTINUE;
 
@@ -2289,8 +2286,7 @@  netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
 	 * we handle as though they are non-injected frames.
 	 * This code here isn't entirely correct, the local MAC address
 	 * isn't always enough to find the interface to use; for proper
-	 * VLAN/WDS support we will need a different mechanism (which
-	 * likely isn't going to be monitor interfaces).
+	 * VLAN support we have an nl80211-based mechanism.
 	 *
 	 * This is necessary, for example, for old hostapd versions that
 	 * don't use nl80211-based management TX/RX.
@@ -2301,8 +2297,7 @@  netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
 		if (!ieee80211_sdata_running(tmp_sdata))
 			continue;
 		if (tmp_sdata->vif.type == NL80211_IFTYPE_MONITOR ||
-		    tmp_sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
-		    tmp_sdata->vif.type == NL80211_IFTYPE_WDS)
+		    tmp_sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
 			continue;
 		if (ether_addr_equal(tmp_sdata->vif.addr, hdr->addr2)) {
 			sdata = tmp_sdata;
@@ -2396,9 +2391,6 @@  int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
 		}
 		sta = sta_info_get_bss(sdata, skb->data);
 		break;
-	case NL80211_IFTYPE_WDS:
-		sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
-		break;
 #ifdef CONFIG_MAC80211_MESH
 	case NL80211_IFTYPE_MESH_POINT:
 		/* determined much later */
@@ -2574,20 +2566,6 @@  static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
 		hdrlen = 24;
 		band = chanctx_conf->def.chan->band;
 		break;
-	case NL80211_IFTYPE_WDS:
-		fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS);
-		/* RA TA DA SA */
-		memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN);
-		memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN);
-		memcpy(hdr.addr3, skb->data, ETH_ALEN);
-		memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN);
-		hdrlen = 30;
-		/*
-		 * This is the exception! WDS style interfaces are prohibited
-		 * when channel contexts are in used so this must be valid
-		 */
-		band = local->hw.conf.chandef.chan->band;
-		break;
 #ifdef CONFIG_MAC80211_MESH
 	case NL80211_IFTYPE_MESH_POINT:
 		if (!is_multicast_ether_addr(skb->data)) {
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 49342060490f..70a27948a084 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2513,7 +2513,6 @@  int ieee80211_reconfig(struct ieee80211_local *local)
 				return res;
 			}
 			break;
-		case NL80211_IFTYPE_WDS:
 		case NL80211_IFTYPE_AP_VLAN:
 		case NL80211_IFTYPE_MONITOR:
 		case NL80211_IFTYPE_P2P_DEVICE:
@@ -2523,6 +2522,7 @@  int ieee80211_reconfig(struct ieee80211_local *local)
 		case NUM_NL80211_IFTYPES:
 		case NL80211_IFTYPE_P2P_CLIENT:
 		case NL80211_IFTYPE_P2P_GO:
+		case NL80211_IFTYPE_WDS:
 			WARN_ON(1);
 			break;
 		}
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 2702d314ef59..9ea6004abe1b 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -205,9 +205,6 @@  u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
 	case NL80211_IFTYPE_AP:
 		ra = skb->data;
 		break;
-	case NL80211_IFTYPE_WDS:
-		ra = sdata->u.wds.remote_addr;
-		break;
 	case NL80211_IFTYPE_STATION:
 		/* might be a TDLS station */
 		sta = sta_info_get(sdata, skb->data);