[lkml]   [2011]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers/staging/ath6kl/os/linux/cfg80211.c: Add missing call to cfg80211_put_bss
Hi Julia,

Julia Lawall <> writes:

> From: Julia Lawall <>
> A call to cfg80211_get_bss hould be accompanied by a call to
> cfg80211_put_bss in error-handling code.


> ---
> I don't really understand the use of the bss variable later. Afterwards,
> along the normal execution path, there is also a call to cfg80211_put_bss,
> but at this point bss has been redefined, and I don't have the impression
> that it still points to the same value.

The original code looks buggy to me:

/* Before informing the join/connect event, make sure that
* bss entry is present in scan list, if it not present
* construct and insert into scan list, otherwise that
* event will be dropped on the way by cfg80211, due to
* this keys will not be plumbed in case of WEP and
* application will not be aware of join/connect status. */
bss = cfg80211_get_bss(ar->wdev->wiphy, NULL, bssid,
ar->wdev->ssid, ar->wdev->ssid_len,
((ADHOC_NETWORK & networkType) ?
((ADHOC_NETWORK & networkType) ?

But, as you point out, the bss is not used for anything. I think the
call and the comment should be just removed.

Kalle Valo

 \ /
  Last update: 2011-05-16 19:13    [W:0.028 / U:36.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site