* BUGLET? cfg80211: .dumpit methods called twice
@ 2009-09-22 7:33 Holger Schurig
2009-09-23 7:02 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2009-09-22 7:33 UTC (permalink / raw)
To: linux-wireless
I just noticed that all functions mentioned on .dumpit in
net/wireless/nl80211.c are actually called twice.
For example, I've added
--- linux-wl.orig/net/wireless/nl80211.c 2009-09-18
14:44:28.000000000 +0200
+++ linux-wl/net/wireless/nl80211.c 2009-09-18
14:45:41.000000000 +0200
@@ -2919,6 +2919,8 @@ static int nl80211_trigger_scan(struct s
enum ieee80211_band band;
size_t ie_len;
+ printk("##HS %s:%d\n", __func__, __LINE__);
+
if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
return -EINVAL;
and when I now issue one "iw eth1 scan dump" I get two logs of
this printk in my dmesg.
AFAIK it doesn't cause any harm, but it's not that efficient and
it might cause harm in the future if any of the .dumpit methods
has the "right" side-effects.
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUGLET? cfg80211: .dumpit methods called twice
2009-09-22 7:33 BUGLET? cfg80211: .dumpit methods called twice Holger Schurig
@ 2009-09-23 7:02 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-09-23 7:02 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
On Tue, 2009-09-22 at 09:33 +0200, Holger Schurig wrote:
> I just noticed that all functions mentioned on .dumpit in
> net/wireless/nl80211.c are actually called twice.
>
> For example, I've added
>
> --- linux-wl.orig/net/wireless/nl80211.c 2009-09-18
> 14:44:28.000000000 +0200
> +++ linux-wl/net/wireless/nl80211.c 2009-09-18
> 14:45:41.000000000 +0200
> @@ -2919,6 +2919,8 @@ static int nl80211_trigger_scan(struct s
> enum ieee80211_band band;
> size_t ie_len;
>
> + printk("##HS %s:%d\n", __func__, __LINE__);
> +
> if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
> return -EINVAL;
>
> and when I now issue one "iw eth1 scan dump" I get two logs of
> this printk in my dmesg.
>
> AFAIK it doesn't cause any harm, but it's not that efficient and
> it might cause harm in the future if any of the .dumpit methods
> has the "right" side-effects.
Umm, that's expected since dumpit() effectively runs until it returns no
more data.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-23 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22 7:33 BUGLET? cfg80211: .dumpit methods called twice Holger Schurig
2009-09-23 7:02 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox