Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2236761b8c53b2e352808576ff51f108b01a0ea8 Commit: 2236761b8c53b2e352808576ff51f108b01a0ea8 Parent: ef3122463d18c0a05b85654473b855a2af494221 Author: Dan Williams <[EMAIL PROTECTED]> AuthorDate: Wed Dec 5 11:01:23 2007 -0500 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Mon Jan 28 15:05:55 2008 -0800
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 <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- 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 100ae33..6d13a0d 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, /* Read the entries one by one */ for (; offset + atom_len <= len; offset += atom_len) { int found = 0; - bss_element *bss; + bss_element *bss = NULL; /* Get next atom */ 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, le16_to_cpu(atom->a.essid_len))) continue; - bss->last_scanned = jiffies; found = 1; break; } @@ -1220,10 +1219,14 @@ static int orinoco_process_scan_results(struct net_device *dev, bss_element, list); 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); } + + if (bss) { + /* Always update the BSS to get latest beacon info */ + memcpy(&bss->bss, atom, sizeof(bss->bss)); + bss->last_scanned = jiffies; + } } return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html