Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58347
b: refs/heads/master
c: 67c4f7a
h: refs/heads/master
i:
  58345: b6078d1
  58343: ce1381d
v: v3
  • Loading branch information
Akinobu Mita authored and Jeff Garzik committed Jul 9, 2007
1 parent f4a1cd2 commit 7142300
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 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: 77548f58070894cf5970a110981e511ffe793369
refs/heads/master: 67c4f7aa9e64d37f32eb44d6d093b7028f1060bb
32 changes: 11 additions & 21 deletions trunk/net/ieee80211/softmac/ieee80211softmac_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,18 +456,13 @@ void
ieee80211softmac_add_network_locked(struct ieee80211softmac_device *mac,
struct ieee80211softmac_network *add_net)
{
struct list_head *list_ptr;
struct ieee80211softmac_network *softmac_net = NULL;
struct ieee80211softmac_network *softmac_net;

list_for_each(list_ptr, &mac->network_list) {
softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
list_for_each_entry(softmac_net, &mac->network_list, list) {
if(!memcmp(softmac_net->bssid, add_net->bssid, ETH_ALEN))
break;
else
softmac_net = NULL;
return;
}
if(softmac_net == NULL)
list_add(&(add_net->list), &mac->network_list);
list_add(&(add_net->list), &mac->network_list);
}

/* Add a network to the list, with locking */
Expand Down Expand Up @@ -506,16 +501,13 @@ struct ieee80211softmac_network *
ieee80211softmac_get_network_by_bssid_locked(struct ieee80211softmac_device *mac,
u8 *bssid)
{
struct list_head *list_ptr;
struct ieee80211softmac_network *softmac_net = NULL;
list_for_each(list_ptr, &mac->network_list) {
softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
struct ieee80211softmac_network *softmac_net;

list_for_each_entry(softmac_net, &mac->network_list, list) {
if(!memcmp(softmac_net->bssid, bssid, ETH_ALEN))
break;
else
softmac_net = NULL;
return softmac_net;
}
return softmac_net;
return NULL;
}

/* Get a network from the list by BSSID with locking */
Expand All @@ -537,11 +529,9 @@ struct ieee80211softmac_network *
ieee80211softmac_get_network_by_essid_locked(struct ieee80211softmac_device *mac,
struct ieee80211softmac_essid *essid)
{
struct list_head *list_ptr;
struct ieee80211softmac_network *softmac_net = NULL;
struct ieee80211softmac_network *softmac_net;

list_for_each(list_ptr, &mac->network_list) {
softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
list_for_each_entry(softmac_net, &mac->network_list, list) {
if (softmac_net->essid.len == essid->len &&
!memcmp(softmac_net->essid.data, essid->data, essid->len))
return softmac_net;
Expand Down

0 comments on commit 7142300

Please sign in to comment.