From: David Lamparter <lists@diac24.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] cfg80211: use nl80211_* enums
Date: Tue, 12 Jun 2007 00:12:26 +0200 [thread overview]
Message-ID: <20070611221224.GA10598@charon.n2.diac24.net> (raw)
Use enum nl80211_phymode and nl80211_iftype where appropriate. Update
mac80211 and nl80211 to match.
Signed-off-by: David Lamparter <equinox@diac24.net>
---
include/net/cfg80211.h | 9 +++++----
net/mac80211/ieee80211_cfg.c | 2 +-
net/wireless/nl80211.c | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 813706a..1398c21 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3,6 +3,7 @@
#include <linux/netlink.h>
#include <linux/skbuff.h>
+#include <linux/nl80211.h>
#include <net/genetlink.h>
/*
@@ -18,7 +19,7 @@
* @active: scan actively or passively on this channel
*/
struct scan_channel {
- int phymode;
+ enum nl80211_phymode phymode;
u32 channel;
int active;
};
@@ -36,7 +37,7 @@ struct scan_channel {
struct scan_params {
int n_channels;
int active;
- int phymode;
+ enum nl80211_phymode phymode;
struct scan_channel *channels;
};
@@ -116,10 +117,10 @@ struct wiphy;
*/
struct cfg80211_ops {
int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
- unsigned int type);
+ enum nl80211_iftype type);
int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
- unsigned int type);
+ enum nl80211_iftype type);
int (*associate)(struct wiphy *wiphy, struct net_device *dev,
struct association_params *params);
diff --git a/net/mac80211/ieee80211_cfg.c b/net/mac80211/ieee80211_cfg.c
index 0069826..8f85bc2 100644
--- a/net/mac80211/ieee80211_cfg.c
+++ b/net/mac80211/ieee80211_cfg.c
@@ -13,7 +13,7 @@
#include "ieee80211_cfg.h"
static int ieee80211_add_iface(struct wiphy *wiphy, char *name,
- unsigned int type)
+ enum nl80211_iftype type)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
int itype;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d6a44a3..ffbe628 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -293,7 +293,7 @@ static int nl80211_add_virt_intf(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *drv;
int err;
- unsigned int type = NL80211_IFTYPE_UNSPECIFIED;
+ enum nl80211_iftype type = NL80211_IFTYPE_UNSPECIFIED;
if (!info->attrs[NL80211_ATTR_IFNAME])
return -EINVAL;
@@ -353,7 +353,7 @@ static int nl80211_change_virt_intf(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *drv;
int err, ifindex;
- unsigned int type;
+ enum nl80211_iftype type;
struct net_device *dev;
if (info->attrs[NL80211_ATTR_IFTYPE]) {
--
1.5.2.1
next reply other threads:[~2007-06-11 22:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 22:12 David Lamparter [this message]
2007-06-12 9:08 ` [PATCH] cfg80211: use nl80211_* enums Johannes Berg
2007-06-13 6:55 ` Michael Wu
2007-06-13 12:33 ` David Lamparter
2007-06-13 15:53 ` Johannes Berg
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=20070611221224.GA10598@charon.n2.diac24.net \
--to=lists@diac24.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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