提交 948ad6b3 编写于 作者: A Andreas Fenkart 提交者: Kalle Valo

mwifiex: scan: replace pointer arithmetic with array access

improves readability
Reviewed-by: NJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: NAndreas Fenkart <afenkart@gmail.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 679b687b
......@@ -1055,27 +1055,24 @@ mwifiex_config_scan(struct mwifiex_private *priv,
chan_idx++) {
channel = user_scan_in->chan_list[chan_idx].chan_number;
(scan_chan_list + chan_idx)->chan_number = channel;
scan_chan_list[chan_idx].chan_number = channel;
radio_type =
user_scan_in->chan_list[chan_idx].radio_type;
(scan_chan_list + chan_idx)->radio_type = radio_type;
scan_chan_list[chan_idx].radio_type = radio_type;
scan_type = user_scan_in->chan_list[chan_idx].scan_type;
if (scan_type == MWIFIEX_SCAN_TYPE_PASSIVE)
(scan_chan_list +
chan_idx)->chan_scan_mode_bitmap
scan_chan_list[chan_idx].chan_scan_mode_bitmap
|= (MWIFIEX_PASSIVE_SCAN |
MWIFIEX_HIDDEN_SSID_REPORT);
else
(scan_chan_list +
chan_idx)->chan_scan_mode_bitmap
scan_chan_list[chan_idx].chan_scan_mode_bitmap
&= ~MWIFIEX_PASSIVE_SCAN;
if (*filtered_scan)
(scan_chan_list +
chan_idx)->chan_scan_mode_bitmap
scan_chan_list[chan_idx].chan_scan_mode_bitmap
|= MWIFIEX_DISABLE_CHAN_FILT;
if (user_scan_in->chan_list[chan_idx].scan_time) {
......@@ -1090,9 +1087,9 @@ mwifiex_config_scan(struct mwifiex_private *priv,
scan_dur = adapter->active_scan_time;
}
(scan_chan_list + chan_idx)->min_scan_time =
scan_chan_list[chan_idx].min_scan_time =
cpu_to_le16(scan_dur);
(scan_chan_list + chan_idx)->max_scan_time =
scan_chan_list[chan_idx].max_scan_time =
cpu_to_le16(scan_dur);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册