Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
78e4f36e
Commit
78e4f36e
authored
Jan 10, 2006
by
Johannes Berg
Committed by
John W. Linville
Mar 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] softmac: select "best" network based on rssi
Signed-off-by:
John W. Linville
<
linville@tuxdriver.com
>
parent
51da28a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
net/ieee80211/softmac/ieee80211softmac_assoc.c
net/ieee80211/softmac/ieee80211softmac_assoc.c
+8
-4
No files found.
net/ieee80211/softmac/ieee80211softmac_assoc.c
View file @
78e4f36e
...
@@ -167,6 +167,8 @@ ieee80211softmac_assoc_work(void *d)
...
@@ -167,6 +167,8 @@ ieee80211softmac_assoc_work(void *d)
/* Search the ieee80211 networks for this network if we didn't find it */
/* Search the ieee80211 networks for this network if we didn't find it */
if
(
!
found
)
if
(
!
found
)
{
{
s8
rssi
=
-
128
;
/* if I don't initialise, gcc emits an invalid warning
because it cannot follow the best pointer logic. */
spin_lock_irqsave
(
&
mac
->
ieee
->
lock
,
flags
);
spin_lock_irqsave
(
&
mac
->
ieee
->
lock
,
flags
);
list_for_each_entry
(
net
,
&
mac
->
ieee
->
network_list
,
list
)
{
list_for_each_entry
(
net
,
&
mac
->
ieee
->
network_list
,
list
)
{
/* we're supposed to find the network with
/* we're supposed to find the network with
...
@@ -174,7 +176,7 @@ ieee80211softmac_assoc_work(void *d)
...
@@ -174,7 +176,7 @@ ieee80211softmac_assoc_work(void *d)
* any network with a specific ESSID, and many
* any network with a specific ESSID, and many
* different ones could have that.
* different ones could have that.
*
*
* I'll for now
implement just finding one at all
* I'll for now
just go with the reported rssi.
*
*
* We also should take into account the rateset
* We also should take into account the rateset
* here to find the best BSSID to try.
* here to find the best BSSID to try.
...
@@ -182,15 +184,17 @@ ieee80211softmac_assoc_work(void *d)
...
@@ -182,15 +184,17 @@ ieee80211softmac_assoc_work(void *d)
if
(
network_matches_request
(
mac
,
net
))
{
if
(
network_matches_request
(
mac
,
net
))
{
if
(
!
best
)
{
if
(
!
best
)
{
best
=
net
;
best
=
net
;
rssi
=
best
->
stats
.
rssi
;
continue
;
continue
;
}
}
/* we already had a matching network, so
/* we already had a matching network, so
* compare their properties to get the
* compare their properties to get the
* better of the two ... (see above)
* better of the two ... (see above)
*/
*/
/* TODO */
if
(
rssi
<
net
->
stats
.
rssi
)
{
/* for now, just */
best
=
net
;
break
;
rssi
=
best
->
stats
.
rssi
;
}
}
}
}
}
/* if we unlock here, we might get interrupted and the `best'
/* if we unlock here, we might get interrupted and the `best'
...
...
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