diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 100ae333df4d..6d13a0d15a0c 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -1194,7 +1194,7 @@ static int orinoco_process_scan_results(struct net_device *dev, | |||
1194 | /* Read the entries one by one */ | 1194 | /* Read the entries one by one */ |
1195 | for (; offset + atom_len <= len; offset += atom_len) { | 1195 | for (; offset + atom_len <= len; offset += atom_len) { |
1196 | int found = 0; | 1196 | int found = 0; |
1197 | bss_element *bss; | 1197 | bss_element *bss = NULL; |
1198 | 1198 | ||
1199 | /* Get next atom */ | 1199 | /* Get next atom */ |
1200 | atom = (union hermes_scan_info *) (buf + offset); | 1200 | atom = (union hermes_scan_info *) (buf + offset); |
@@ -1209,7 +1209,6 @@ static int orinoco_process_scan_results(struct net_device *dev, | |||
1209 | if (memcmp(bss->bss.a.essid, atom->a.essid, | 1209 | if (memcmp(bss->bss.a.essid, atom->a.essid, |
1210 | le16_to_cpu(atom->a.essid_len))) | 1210 | le16_to_cpu(atom->a.essid_len))) |
1211 | continue; | 1211 | continue; |
1212 | bss->last_scanned = jiffies; | ||
1213 | found = 1; | 1212 | found = 1; |
1214 | break; | 1213 | break; |
1215 | } | 1214 | } |
@@ -1220,10 +1219,14 @@ static int orinoco_process_scan_results(struct net_device *dev, | |||
1220 | bss_element, list); | 1219 | bss_element, list); |
1221 | list_del(priv->bss_free_list.next); | 1220 | list_del(priv->bss_free_list.next); |
1222 | 1221 | ||
1223 | memcpy(bss, atom, sizeof(bss->bss)); | ||
1224 | bss->last_scanned = jiffies; | ||
1225 | list_add_tail(&bss->list, &priv->bss_list); | 1222 | list_add_tail(&bss->list, &priv->bss_list); |
1226 | } | 1223 | } |
1224 | |||
1225 | if (bss) { | ||
1226 | /* Always update the BSS to get latest beacon info */ | ||
1227 | memcpy(&bss->bss, atom, sizeof(bss->bss)); | ||
1228 | bss->last_scanned = jiffies; | ||
1229 | } | ||
1227 | } | 1230 | } |
1228 | 1231 | ||
1229 | return 0; | 1232 | return 0; |