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

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

mac80211: move bss_conf into vif



Move bss_conf into the vif struct so that drivers can
access it during ->tx without having to store it in
the private data or similar. No driver updates because
this is only for when they want to start using it.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9124b077
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -529,11 +529,14 @@ struct ieee80211_conf {
 * use during the life of a virtual interface.
 *
 * @type: type of this virtual interface
 * @bss_conf: BSS configuration for this interface, either our own
 *	or the BSS we're associated to
 * @drv_priv: data area for driver use, will always be aligned to
 *	sizeof(void *).
 */
struct ieee80211_vif {
	enum nl80211_iftype type;
	struct ieee80211_bss_conf bss_conf;
	/* must be last */
	u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
};
+3 −3
Original line number Diff line number Diff line
@@ -964,16 +964,16 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
		return -EINVAL;

	if (params->use_cts_prot >= 0) {
		sdata->bss_conf.use_cts_prot = params->use_cts_prot;
		sdata->vif.bss_conf.use_cts_prot = params->use_cts_prot;
		changed |= BSS_CHANGED_ERP_CTS_PROT;
	}
	if (params->use_short_preamble >= 0) {
		sdata->bss_conf.use_short_preamble =
		sdata->vif.bss_conf.use_short_preamble =
			params->use_short_preamble;
		changed |= BSS_CHANGED_ERP_PREAMBLE;
	}
	if (params->use_short_slot_time >= 0) {
		sdata->bss_conf.use_short_slot =
		sdata->vif.bss_conf.use_short_slot =
			params->use_short_slot_time;
		changed |= BSS_CHANGED_ERP_SLOT;
	}
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ static ssize_t ieee80211_if_fmt_flags(
		 sdata->u.sta.flags & IEEE80211_STA_AUTHENTICATED ? "AUTH\n" : "",
		 sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED ? "ASSOC\n" : "",
		 sdata->u.sta.flags & IEEE80211_STA_PROBEREQ_POLL ? "PROBEREQ POLL\n" : "",
		 sdata->bss_conf.use_cts_prot ? "CTS prot\n" : "");
		 sdata->vif.bss_conf.use_cts_prot ? "CTS prot\n" : "");
}
__IEEE80211_IF_FILE(flags);

+0 −3
Original line number Diff line number Diff line
@@ -440,9 +440,6 @@ struct ieee80211_sub_if_data {

	u16 sequence_number;

	/* BSS configuration for this interface. */
	struct ieee80211_bss_conf bss_conf;

	/*
	 * AP this belongs to: self in AP mode and
	 * corresponding AP in VLAN mode, NULL for
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
	ieee80211_setup_sdata(sdata, type);

	/* reset some values that shouldn't be kept across type changes */
	sdata->bss_conf.basic_rates =
	sdata->vif.bss_conf.basic_rates =
		ieee80211_mandatory_rates(sdata->local,
			sdata->local->hw.conf.channel->band);
	sdata->drop_unencrypted = 0;
Loading