Hi Emmanuel,
On Mon, Apr 30, 2012 at 16:53, Emmanuel Grumbach
<emmanuel.grumbach@xxxxxxxxx> wrote:
> Since the BSS table is organized in a RB tree, the BSSs need to be
> comparable. This means that we must define a < and > operator to
> the BSS object.
> compare_ethr_addr isn't enough since it returns only a binary value.
[snip]
> ---
> net/wireless/scan.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/wireless/scan.c b/net/wireless/scan.c
> index bd6a0ee..8c8b550 100644
> --- a/net/wireless/scan.c
> +++ b/net/wireless/scan.c
> @@ -378,7 +378,7 @@ static int cmp_bss_core(struct cfg80211_bss *a,
> b->len_information_elements);
> }
>
> - return compare_ether_addr(a->bssid, b->bssid);
> + return memcmp(a->bssid, b->bssid, sizeof(a->bssid));
You should probably add a comment here to remind people that
compare_ether_addr() will cause issues or someone will change it
again.
Thanks,
--
Julian Calaby
Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel]
[Linux Bluetooth]
[Linux Netdev]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]
[Free Dating]
[M2M Wireless]