orinoco: always use latest BSS info when caching scan results
Always copy the latest BSS information from the firmware's results to the driver's BSS table to ensure that everything is up-to-date (IEs, supported rates, encryption status, etc). Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
ef3122463d
commit
2236761b8c
1 changed files with 7 additions and 4 deletions
|
@ -1194,7 +1194,7 @@ static int orinoco_process_scan_results(struct net_device *dev,
|
||||||
/* Read the entries one by one */
|
/* Read the entries one by one */
|
||||||
for (; offset + atom_len <= len; offset += atom_len) {
|
for (; offset + atom_len <= len; offset += atom_len) {
|
||||||
int found = 0;
|
int found = 0;
|
||||||
bss_element *bss;
|
bss_element *bss = NULL;
|
||||||
|
|
||||||
/* Get next atom */
|
/* Get next atom */
|
||||||
atom = (union hermes_scan_info *) (buf + offset);
|
atom = (union hermes_scan_info *) (buf + offset);
|
||||||
|
@ -1209,7 +1209,6 @@ static int orinoco_process_scan_results(struct net_device *dev,
|
||||||
if (memcmp(bss->bss.a.essid, atom->a.essid,
|
if (memcmp(bss->bss.a.essid, atom->a.essid,
|
||||||
le16_to_cpu(atom->a.essid_len)))
|
le16_to_cpu(atom->a.essid_len)))
|
||||||
continue;
|
continue;
|
||||||
bss->last_scanned = jiffies;
|
|
||||||
found = 1;
|
found = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1220,10 +1219,14 @@ static int orinoco_process_scan_results(struct net_device *dev,
|
||||||
bss_element, list);
|
bss_element, list);
|
||||||
list_del(priv->bss_free_list.next);
|
list_del(priv->bss_free_list.next);
|
||||||
|
|
||||||
memcpy(bss, atom, sizeof(bss->bss));
|
|
||||||
bss->last_scanned = jiffies;
|
|
||||||
list_add_tail(&bss->list, &priv->bss_list);
|
list_add_tail(&bss->list, &priv->bss_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bss) {
|
||||||
|
/* Always update the BSS to get latest beacon info */
|
||||||
|
memcpy(&bss->bss, atom, sizeof(bss->bss));
|
||||||
|
bss->last_scanned = jiffies;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue