Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
35a4e181
Commit
35a4e181
authored
Jun 24, 2014
by
Emmanuel Grumbach
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
parents
ab480030
89879413
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
46 deletions
+19
-46
drivers/net/wireless/iwlwifi/mvm/scan.c
drivers/net/wireless/iwlwifi/mvm/scan.c
+19
-46
No files found.
drivers/net/wireless/iwlwifi/mvm/scan.c
View file @
35a4e181
...
@@ -589,9 +589,7 @@ static void iwl_build_scan_cmd(struct iwl_mvm *mvm,
...
@@ -589,9 +589,7 @@ static void iwl_build_scan_cmd(struct iwl_mvm *mvm,
struct
iwl_scan_offload_cmd
*
scan
,
struct
iwl_scan_offload_cmd
*
scan
,
struct
iwl_mvm_scan_params
*
params
)
struct
iwl_mvm_scan_params
*
params
)
{
{
scan
->
channel_count
=
scan
->
channel_count
=
req
->
n_channels
;
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_2GHZ
].
n_channels
+
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_5GHZ
].
n_channels
;
scan
->
quiet_time
=
cpu_to_le16
(
IWL_ACTIVE_QUIET_TIME
);
scan
->
quiet_time
=
cpu_to_le16
(
IWL_ACTIVE_QUIET_TIME
);
scan
->
quiet_plcp_th
=
cpu_to_le16
(
IWL_PLCP_QUIET_THRESH
);
scan
->
quiet_plcp_th
=
cpu_to_le16
(
IWL_PLCP_QUIET_THRESH
);
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH_DEFAULT
;
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH_DEFAULT
;
...
@@ -670,61 +668,37 @@ static void iwl_build_channel_cfg(struct iwl_mvm *mvm,
...
@@ -670,61 +668,37 @@ static void iwl_build_channel_cfg(struct iwl_mvm *mvm,
struct
cfg80211_sched_scan_request
*
req
,
struct
cfg80211_sched_scan_request
*
req
,
struct
iwl_scan_channel_cfg
*
channels
,
struct
iwl_scan_channel_cfg
*
channels
,
enum
ieee80211_band
band
,
enum
ieee80211_band
band
,
int
*
head
,
int
*
tail
,
int
*
head
,
u32
ssid_bitmap
,
u32
ssid_bitmap
,
struct
iwl_mvm_scan_params
*
params
)
struct
iwl_mvm_scan_params
*
params
)
{
{
struct
ieee80211_supported_band
*
s_band
;
int
i
,
index
=
0
;
int
n_channels
=
req
->
n_channels
;
int
i
,
j
,
index
=
0
;
bool
partial
;
/*
for
(
i
=
0
;
i
<
req
->
n_channels
;
i
++
)
{
* We have to configure all supported channels, even if we don't want to
struct
ieee80211_channel
*
chan
=
req
->
channels
[
i
];
* scan on them, but we have to send channels in the order that we want
* to scan. So add requested channels to head of the list and others to
if
(
chan
->
band
!=
band
)
* the end.
continue
;
*/
s_band
=
&
mvm
->
nvm_data
->
bands
[
band
];
index
=
*
head
;
(
*
head
)
++
;
for
(
i
=
0
;
i
<
s_band
->
n_channels
&&
*
head
<=
*
tail
;
i
++
)
{
partial
=
false
;
channels
->
channel_number
[
index
]
=
cpu_to_le16
(
chan
->
hw_value
);
for
(
j
=
0
;
j
<
n_channels
;
j
++
)
if
(
s_band
->
channels
[
i
].
center_freq
==
req
->
channels
[
j
]
->
center_freq
)
{
index
=
*
head
;
(
*
head
)
++
;
/*
* Channels that came with the request will be
* in partial scan .
*/
partial
=
true
;
break
;
}
if
(
!
partial
)
{
index
=
*
tail
;
(
*
tail
)
--
;
}
channels
->
channel_number
[
index
]
=
cpu_to_le16
(
ieee80211_frequency_to_channel
(
s_band
->
channels
[
i
].
center_freq
));
channels
->
dwell_time
[
index
][
0
]
=
params
->
dwell
[
band
].
active
;
channels
->
dwell_time
[
index
][
0
]
=
params
->
dwell
[
band
].
active
;
channels
->
dwell_time
[
index
][
1
]
=
params
->
dwell
[
band
].
passive
;
channels
->
dwell_time
[
index
][
1
]
=
params
->
dwell
[
band
].
passive
;
channels
->
iter_count
[
index
]
=
cpu_to_le16
(
1
);
channels
->
iter_count
[
index
]
=
cpu_to_le16
(
1
);
channels
->
iter_interval
[
index
]
=
0
;
channels
->
iter_interval
[
index
]
=
0
;
if
(
!
(
s_band
->
channels
[
i
].
flags
&
IEEE80211_CHAN_NO_IR
))
if
(
!
(
chan
->
flags
&
IEEE80211_CHAN_NO_IR
))
channels
->
type
[
index
]
|=
channels
->
type
[
index
]
|=
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_ACTIVE
);
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_ACTIVE
);
channels
->
type
[
index
]
|=
channels
->
type
[
index
]
|=
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_FULL
);
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_FULL
|
if
(
partial
)
IWL_SCAN_OFFLOAD_CHANNEL_PARTIAL
);
channels
->
type
[
index
]
|=
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_PARTIAL
);
if
(
s_band
->
channels
[
i
].
flags
&
IEEE80211_CHAN_NO_HT40
)
if
(
chan
->
flags
&
IEEE80211_CHAN_NO_HT40
)
channels
->
type
[
index
]
|=
channels
->
type
[
index
]
|=
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_NARROW
);
cpu_to_le32
(
IWL_SCAN_OFFLOAD_CHANNEL_NARROW
);
...
@@ -741,7 +715,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
...
@@ -741,7 +715,6 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
int
band_2ghz
=
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_2GHZ
].
n_channels
;
int
band_2ghz
=
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_2GHZ
].
n_channels
;
int
band_5ghz
=
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_5GHZ
].
n_channels
;
int
band_5ghz
=
mvm
->
nvm_data
->
bands
[
IEEE80211_BAND_5GHZ
].
n_channels
;
int
head
=
0
;
int
head
=
0
;
int
tail
=
band_2ghz
+
band_5ghz
-
1
;
u32
ssid_bitmap
;
u32
ssid_bitmap
;
int
cmd_len
;
int
cmd_len
;
int
ret
;
int
ret
;
...
@@ -773,7 +746,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
...
@@ -773,7 +746,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
&
scan_cfg
->
scan_cmd
.
tx_cmd
[
0
],
&
scan_cfg
->
scan_cmd
.
tx_cmd
[
0
],
scan_cfg
->
data
);
scan_cfg
->
data
);
iwl_build_channel_cfg
(
mvm
,
req
,
&
scan_cfg
->
channel_cfg
,
iwl_build_channel_cfg
(
mvm
,
req
,
&
scan_cfg
->
channel_cfg
,
IEEE80211_BAND_2GHZ
,
&
head
,
&
tail
,
IEEE80211_BAND_2GHZ
,
&
head
,
ssid_bitmap
,
&
params
);
ssid_bitmap
,
&
params
);
}
}
if
(
band_5ghz
)
{
if
(
band_5ghz
)
{
...
@@ -783,7 +756,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
...
@@ -783,7 +756,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm,
scan_cfg
->
data
+
scan_cfg
->
data
+
SCAN_OFFLOAD_PROBE_REQ_SIZE
);
SCAN_OFFLOAD_PROBE_REQ_SIZE
);
iwl_build_channel_cfg
(
mvm
,
req
,
&
scan_cfg
->
channel_cfg
,
iwl_build_channel_cfg
(
mvm
,
req
,
&
scan_cfg
->
channel_cfg
,
IEEE80211_BAND_5GHZ
,
&
head
,
&
tail
,
IEEE80211_BAND_5GHZ
,
&
head
,
ssid_bitmap
,
&
params
);
ssid_bitmap
,
&
params
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment