linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix swapped parameters to ieee80211_set_channel()
@ 2007-12-12 15:31 Andrew Lunn
  2007-12-12 17:43 ` Johannes Berg
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2007-12-12 15:31 UTC (permalink / raw)
  To: flamingice, linux-wireless

Hi Folks

I found a silly typo in
net/mac80211/ieee80211_ioctl.c:ieee80211_ioctl_siwfreq().

The parameters passed to ieee80211_set_channel() should be 
(local, channel, freq), but in one instance it passes 
(local, freq, channel) which results in an EINVAL.

        Andrew

Signed-off-by: Andrew Lunn, <andrew@lunn.ch>
---
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 7027eed..d4a032e 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -344,7 +344,7 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
                                        IEEE80211_STA_AUTO_CHANNEL_SEL;
                        return 0;
                } else
-                       return ieee80211_set_channel(local, freq->m, -1);
+                        return ieee80211_set_channel(local, -1, freq->m);
        } else {
                int i, div = 1000000;
                for (i = 0; i < freq->e; i++)

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-12-13 13:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 15:31 [PATCH] mac80211: Fix swapped parameters to ieee80211_set_channel() Andrew Lunn
2007-12-12 17:43 ` Johannes Berg
2007-12-12 18:02   ` [PATCH] try 2: " Andrew Lunn
2007-12-12 18:09     ` Johannes Berg
2007-12-13  0:16       ` Johannes Berg
2007-12-13 12:09         ` Andrew Lunn
2007-12-13 12:30           ` Johannes Berg
2007-12-13 12:50             ` Andrew Lunn
2007-12-13 12:53               ` Johannes Berg
2007-12-13 13:07                 ` [PATCH] wirelesstools: More user space validation of channel/frequency Andrew Lunn
2007-12-13 12:37           ` [PATCH] try 2: mac80211: Fix swapped parameters to ieee80211_set_channel() Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).