Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41bb73ee authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: remove SSID driver code



Remove the SSID from the driver API since now there is no
driver that requires knowing the SSID and I think it's
unlikely that any hardware design that does require the
SSID will play well with mac80211.

This also removes support for setting the SSID in master
mode which will require a patch to hostapd to not try.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b23f99bc
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -2957,13 +2957,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
			return rc;
	}

	if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
	    (!conf->ssid_len)) {
		IWL_DEBUG_MAC80211
		    ("Leaving in AP mode because HostAPD is not ready.\n");
		return 0;
	}

	if (!iwl_is_alive(priv))
		return -EAGAIN;

+0 −7
Original line number Diff line number Diff line
@@ -6743,13 +6743,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,

	/* XXX: this MUST use conf->mac_addr */

	if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
	    (!conf->ssid_len)) {
		IWL_DEBUG_MAC80211
		    ("Leaving in AP mode because HostAPD is not ready.\n");
		return 0;
	}

	if (!iwl3945_is_alive(priv))
		return -EAGAIN;

+1 −10
Original line number Diff line number Diff line
@@ -616,14 +616,12 @@ struct ieee80211_if_init_conf {
 * enum ieee80211_if_conf_change - interface config change flags
 *
 * @IEEE80211_IFCC_BSSID: The BSSID changed.
 * @IEEE80211_IFCC_SSID: The SSID changed.
 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
 *	(currently AP and MESH only), use ieee80211_beacon_get().
 */
enum ieee80211_if_conf_change {
	IEEE80211_IFCC_BSSID	= BIT(0),
	IEEE80211_IFCC_SSID	= BIT(1),
	IEEE80211_IFCC_BEACON	= BIT(2),
	IEEE80211_IFCC_BEACON	= BIT(1),
};

/**
@@ -631,11 +629,6 @@ enum ieee80211_if_conf_change {
 *
 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
 * @bssid: BSSID of the network we are associated to/creating.
 * @ssid: used (together with @ssid_len) by drivers for hardware that
 *	generate beacons independently. The pointer is valid only during the
 *	config_interface() call, so copy the value somewhere if you need
 *	it.
 * @ssid_len: length of the @ssid field.
 *
 * This structure is passed to the config_interface() callback of
 * &struct ieee80211_hw.
@@ -643,8 +636,6 @@ enum ieee80211_if_conf_change {
struct ieee80211_if_conf {
	u32 changed;
	u8 *bssid;
	u8 *ssid;
	size_t ssid_len;
};

/**
+0 −3
Original line number Diff line number Diff line
@@ -212,9 +212,6 @@ struct ieee80211_if_ap {

	struct list_head vlans;

	u8 ssid[IEEE80211_MAX_SSID_LEN];
	size_t ssid_len;

	/* yes, this looks ugly, but guarantees that we can later use
	 * bitmap_empty :)
	 * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
+3 −12
Original line number Diff line number Diff line
@@ -171,19 +171,13 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
	conf.changed = changed;

	if (sdata->vif.type == NL80211_IFTYPE_STATION ||
	    sdata->vif.type == NL80211_IFTYPE_ADHOC) {
	    sdata->vif.type == NL80211_IFTYPE_ADHOC)
		conf.bssid = sdata->u.sta.bssid;
		conf.ssid = sdata->u.sta.ssid;
		conf.ssid_len = sdata->u.sta.ssid_len;
	} else if (sdata->vif.type == NL80211_IFTYPE_AP) {
	else if (sdata->vif.type == NL80211_IFTYPE_AP)
		conf.bssid = sdata->dev->dev_addr;
		conf.ssid = sdata->u.ap.ssid;
		conf.ssid_len = sdata->u.ap.ssid_len;
	} else if (ieee80211_vif_is_mesh(&sdata->vif)) {
	else if (ieee80211_vif_is_mesh(&sdata->vif)) {
		u8 zero[ETH_ALEN] = { 0 };
		conf.bssid = zero;
		conf.ssid = zero;
		conf.ssid_len = 0;
	} else {
		WARN_ON(1);
		return -EINVAL;
@@ -192,9 +186,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
	if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID)))
		return -EINVAL;

	if (WARN_ON(!conf.ssid && (changed & IEEE80211_IFCC_SSID)))
		return -EINVAL;

	return local->ops->config_interface(local_to_hw(local),
					    &sdata->vif, &conf);
}
Loading