Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23290
b: refs/heads/master
c: 78e4f36
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 23, 2006
1 parent 999756e commit 7da129b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51da28a847027fdf80e55a2a0d7bd0f7a8617d3d
refs/heads/master: 78e4f36e053b4d2c4623fdc1f6ac63f33d5b7c81
12 changes: 8 additions & 4 deletions trunk/net/ieee80211/softmac/ieee80211softmac_assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,30 +167,34 @@ ieee80211softmac_assoc_work(void *d)
/* Search the ieee80211 networks for this network if we didn't find it */
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);
list_for_each_entry(net, &mac->ieee->network_list, list) {
/* we're supposed to find the network with
* the best signal here, as we're asked to join
* any network with a specific ESSID, and many
* 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
* here to find the best BSSID to try.
*/
if (network_matches_request(mac, net)) {
if (!best) {
best = net;
rssi = best->stats.rssi;
continue;
}
/* we already had a matching network, so
* compare their properties to get the
* better of the two ... (see above)
*/
/* TODO */
/* for now, just */
break;
if (rssi < net->stats.rssi) {
best = net;
rssi = best->stats.rssi;
}
}
}
/* if we unlock here, we might get interrupted and the `best'
Expand Down

0 comments on commit 7da129b

Please sign in to comment.