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

Commit 14b54336 authored by Reinette Chatre's avatar Reinette Chatre Committed by John W. Linville
Browse files

iwl3945: do not send scan command if channel count zero

parent 2420ebc1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6256,6 +6256,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
					      n_probes,
			(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);

	if (scan->channel_count == 0) {
		IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count);
		goto done;
	}

	cmd.len += le16_to_cpu(scan->tx_cmd.len) +
	    scan->channel_count * sizeof(struct iwl3945_scan_channel);
	cmd.data = scan;