Commit aedeb963 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

staging: wfx: fix typo in "num_of_ssi_ds"



The script that has imported API headers has made a mistake in
"num_of_ssi_ds".

Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-24-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36f7e3ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ struct hif_req_start_scan {
	struct hif_auto_scan_param auto_scan_param;
	u8    num_of_probe_requests;
	u8    probe_delay;
	u8    num_of_ssi_ds;
	u8    num_of_ssids;
	u8    num_of_channels;
	u32   min_channel_time;
	u32   max_channel_time;
@@ -196,7 +196,7 @@ struct hif_start_scan_req_cstnbssid_body {
	struct hif_auto_scan_param auto_scan_param;
	u8    num_of_probe_requests;
	u8    probe_delay;
	u8    num_of_ssi_ds;
	u8    num_of_ssids;
	u8    num_of_channels;
	u32   min_channel_time;
	u32   max_channel_time;
+5 −5
Original line number Diff line number Diff line
@@ -227,12 +227,12 @@ int hif_scan(struct wfx_vif *wvif, const struct wfx_scan_params *arg)
	struct hif_ssid_def *ssids;
	size_t buf_len = sizeof(struct hif_req_start_scan) +
		arg->scan_req.num_of_channels * sizeof(u8) +
		arg->scan_req.num_of_ssi_ds * sizeof(struct hif_ssid_def);
		arg->scan_req.num_of_ssids * sizeof(struct hif_ssid_def);
	struct hif_req_start_scan *body = wfx_alloc_hif(buf_len, &hif);
	u8 *ptr = (u8 *) body + sizeof(*body);

	WARN(arg->scan_req.num_of_channels > HIF_API_MAX_NB_CHANNELS, "invalid params");
	WARN(arg->scan_req.num_of_ssi_ds > 2, "invalid params");
	WARN(arg->scan_req.num_of_ssids > 2, "invalid params");
	WARN(arg->scan_req.band > 1, "invalid params");

	// FIXME: This API is unnecessary complex, fixing NumOfChannels and
@@ -243,11 +243,11 @@ int hif_scan(struct wfx_vif *wvif, const struct wfx_scan_params *arg)
	cpu_to_le32s(&body->max_channel_time);
	cpu_to_le32s(&body->tx_power_level);
	memcpy(ptr, arg->ssids,
	       arg->scan_req.num_of_ssi_ds * sizeof(struct hif_ssid_def));
	       arg->scan_req.num_of_ssids * sizeof(struct hif_ssid_def));
	ssids = (struct hif_ssid_def *) ptr;
	for (i = 0; i < body->num_of_ssi_ds; ++i)
	for (i = 0; i < body->num_of_ssids; ++i)
		cpu_to_le32s(&ssids[i].ssid_length);
	ptr += arg->scan_req.num_of_ssi_ds * sizeof(struct hif_ssid_def);
	ptr += arg->scan_req.num_of_ssids * sizeof(struct hif_ssid_def);
	memcpy(ptr, arg->ch, arg->scan_req.num_of_channels * sizeof(u8));
	ptr += arg->scan_req.num_of_channels * sizeof(u8);
	WARN(buf_len != ptr - (u8 *) body, "allocation size mismatch");
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ void wfx_scan_work(struct work_struct *work)
		scan.scan_req.max_transmit_rate = API_RATE_INDEX_B_1MBPS;
	scan.scan_req.num_of_probe_requests =
		(first->flags & IEEE80211_CHAN_NO_IR) ? 0 : 2;
	scan.scan_req.num_of_ssi_ds = wvif->scan.n_ssids;
	scan.scan_req.num_of_ssids = wvif->scan.n_ssids;
	scan.ssids = &wvif->scan.ssids[0];
	scan.scan_req.num_of_channels = it - wvif->scan.curr;
	scan.scan_req.probe_delay = 100;