From: Andrew Lunn <andrew@lunn.ch>
To: flamingice@sourmilk.net, linux-wireless@vger.kernel.org
Subject: [PATCH] mac80211: Fix swapped parameters to ieee80211_set_channel()
Date: Wed, 12 Dec 2007 16:31:58 +0100 [thread overview]
Message-ID: <20071212153158.GB16947@lunn.ch> (raw)
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++)
next reply other threads:[~2007-12-12 16:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 15:31 Andrew Lunn [this message]
2007-12-12 17:43 ` [PATCH] mac80211: Fix swapped parameters to ieee80211_set_channel() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071212153158.GB16947@lunn.ch \
--to=andrew@lunn.ch \
--cc=flamingice@sourmilk.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).