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

Commit bb963c4a authored by David Spinadel's avatar David Spinadel Committed by Johannes Berg
Browse files

iwlwifi: mvm: set SSID bits for passive channels



Set SSID bitmap for direct scan even on passive channels,
for the passive-to-active feature. Without this patch only
the SSID from probe request template is sent on passive
channels, after passive-to-active switching, causing us to
not find all desired networks.

Remove the unused passive scan mask constant.

Cc: stable@vger.kernel.org
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarDavid Spinadel <david.spinadel@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5312e54d
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -69,7 +69,6 @@
/* Scan Commands, Responses, Notifications */
/* Scan Commands, Responses, Notifications */


/* Masks for iwl_scan_channel.type flags */
/* Masks for iwl_scan_channel.type flags */
#define SCAN_CHANNEL_TYPE_PASSIVE	0
#define SCAN_CHANNEL_TYPE_ACTIVE	BIT(0)
#define SCAN_CHANNEL_TYPE_ACTIVE	BIT(0)
#define SCAN_CHANNEL_NARROW_BAND	BIT(22)
#define SCAN_CHANNEL_NARROW_BAND	BIT(22)


+2 −9
Original line number Original line Diff line number Diff line
@@ -178,19 +178,12 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd,
	struct iwl_scan_channel *chan = (struct iwl_scan_channel *)
	struct iwl_scan_channel *chan = (struct iwl_scan_channel *)
		(cmd->data + le16_to_cpu(cmd->tx_cmd.len));
		(cmd->data + le16_to_cpu(cmd->tx_cmd.len));
	int i;
	int i;
	__le32 chan_type_value;

	if (req->n_ssids > 0)
		chan_type_value = cpu_to_le32(BIT(req->n_ssids) - 1);
	else
		chan_type_value = SCAN_CHANNEL_TYPE_PASSIVE;


	for (i = 0; i < cmd->channel_count; i++) {
	for (i = 0; i < cmd->channel_count; i++) {
		chan->channel = cpu_to_le16(req->channels[i]->hw_value);
		chan->channel = cpu_to_le16(req->channels[i]->hw_value);
		chan->type = cpu_to_le32(BIT(req->n_ssids) - 1);
		if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN)
		if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN)
			chan->type = SCAN_CHANNEL_TYPE_PASSIVE;
			chan->type &= cpu_to_le32(~SCAN_CHANNEL_TYPE_ACTIVE);
		else
			chan->type = chan_type_value;
		chan->active_dwell = cpu_to_le16(active_dwell);
		chan->active_dwell = cpu_to_le16(active_dwell);
		chan->passive_dwell = cpu_to_le16(passive_dwell);
		chan->passive_dwell = cpu_to_le16(passive_dwell);
		chan->iteration_count = cpu_to_le16(1);
		chan->iteration_count = cpu_to_le16(1);