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

Commit 5bcae31d authored by Michal Kazior's avatar Michal Kazior Committed by Johannes Berg
Browse files

mac80211: implement multi-vif in-place reservations



Multi-vif in-place reservations happen when
it is impossible to allocate more channel contexts
as indicated by interface combinations.

Such reservations are not finalized until all
assigned interfaces are ready.

This still doesn't handle all possible cases
(i.e. degradation of number of channels) properly.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 633e2713
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1606,12 +1606,6 @@ struct ieee80211_tx_control {
 *	is not enabled the default action is to disconnect when getting the
 *	CSA frame.
 *
 * @IEEE80211_HW_CHANGE_RUNNING_CHANCTX: The hardware can change a
 *	channel context on-the-fly.  This is needed for channel switch
 *	on single-channel hardware.  It can also be used as an
 *	optimization in certain channel switch cases with
 *	multi-channel.
 *
 * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands
 *	in one command, mac80211 doesn't have to run separate scans per band.
 */
@@ -1645,7 +1639,7 @@ enum ieee80211_hw_flags {
	IEEE80211_HW_TIMING_BEACON_ONLY			= 1<<26,
	IEEE80211_HW_SUPPORTS_HT_CCK_RATES		= 1<<27,
	IEEE80211_HW_CHANCTX_STA_CSA			= 1<<28,
	IEEE80211_HW_CHANGE_RUNNING_CHANCTX		= 1<<29,
	/* bit 29 unused */
	IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS		= 1<<30,
};

+683 −82

File changed.

Preview size limit exceeded, changes collapsed.

+24 −2

File changed.

Preview size limit exceeded, changes collapsed.

+8 −1
Original line number Diff line number Diff line
@@ -1698,6 +1698,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
	if (local->use_chanctx) {
		mutex_lock(&local->chanctx_mtx);
		list_for_each_entry(ctx, &local->chanctx_list, list)
			if (ctx->replace_state !=
			    IEEE80211_CHANCTX_REPLACES_OTHER)
				WARN_ON(drv_add_chanctx(local, ctx));
		mutex_unlock(&local->chanctx_mtx);

@@ -2972,6 +2974,8 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
		num[iftype] = 1;

	list_for_each_entry(ctx, &local->chanctx_list, list) {
		if (ctx->replace_state == IEEE80211_CHANCTX_WILL_BE_REPLACED)
			continue;
		if (ctx->conf.radar_enabled)
			radar_detect |= BIT(ctx->conf.def.width);
		if (ctx->mode == IEEE80211_CHANCTX_EXCLUSIVE) {
@@ -3030,6 +3034,9 @@ int ieee80211_max_num_channels(struct ieee80211_local *local)
	lockdep_assert_held(&local->chanctx_mtx);

	list_for_each_entry(ctx, &local->chanctx_list, list) {
		if (ctx->replace_state == IEEE80211_CHANCTX_WILL_BE_REPLACED)
			continue;

		num_different_channels++;

		if (ctx->conf.radar_enabled)