summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2011-12-17 10:23:17 +0000
committerbschmidt <bschmidt@FreeBSD.org>2011-12-17 10:23:17 +0000
commit49344f6037da62f1994e58cd9a5ba941ac34c519 (patch)
tree3c0e73624fc59f5cc0b4ea521b1b967a5d4fc80d /sys/net80211
parenta6ba1663e403051d36000b3b14ac9e5c92576a29 (diff)
downloadFreeBSD-src-49344f6037da62f1994e58cd9a5ba941ac34c519.zip
FreeBSD-src-49344f6037da62f1994e58cd9a5ba941ac34c519.tar.gz
Fix some net80211 enum nits:
- ic_vap_create() uses an ieee80211_opmode argument - ieee80211_rate2media() takes an ieee80211_phymode argument - ieee80211_plcp2rate() takes an ieee80211_phytype argument - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warnings Submitted by: arundel@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211.c14
-rw-r--r--sys/net80211/ieee80211_ht.c7
-rw-r--r--sys/net80211/ieee80211_ioctl.c4
-rw-r--r--sys/net80211/ieee80211_var.h11
4 files changed, 21 insertions, 15 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index cf5945a..24a5405 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -384,9 +384,9 @@ default_reset(struct ieee80211vap *vap, u_long cmd)
*/
int
ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t macaddr[IEEE80211_ADDR_LEN])
+ const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode,
+ int flags, const uint8_t bssid[IEEE80211_ADDR_LEN],
+ const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
struct ifnet *ifp;
@@ -447,6 +447,8 @@ ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap,
}
break;
#endif
+ default:
+ break;
}
/* auto-enable s/w beacon miss support */
if (flags & IEEE80211_CLONE_NOBEACONS)
@@ -1008,7 +1010,8 @@ ieee80211_media_setup(struct ieee80211com *ic,
struct ifmedia *media, int caps, int addsta,
ifm_change_cb_t media_change, ifm_stat_cb_t media_stat)
{
- int i, j, mode, rate, maxrate, mword, r;
+ int i, j, rate, maxrate, mword, r;
+ enum ieee80211_phymode mode;
const struct ieee80211_rateset *rs;
struct ieee80211_rateset allrates;
@@ -1137,7 +1140,8 @@ void
ieee80211_announce(struct ieee80211com *ic)
{
struct ifnet *ifp = ic->ic_ifp;
- int i, mode, rate, mword;
+ int i, rate, mword;
+ enum ieee80211_phymode mode;
const struct ieee80211_rateset *rs;
/* NB: skip AUTO since it has no rates */
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index c49a178..ef90ac1 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -307,7 +307,8 @@ ieee80211_ht_vdetach(struct ieee80211vap *vap)
}
static int
-ht_getrate(struct ieee80211com *ic, int index, int mode, int ratetype)
+ht_getrate(struct ieee80211com *ic, int index, enum ieee80211_phymode mode,
+ int ratetype)
{
int mword, rate;
@@ -350,7 +351,7 @@ static struct printranges {
};
static void
-ht_rateprint(struct ieee80211com *ic, int mode, int ratetype)
+ht_rateprint(struct ieee80211com *ic, enum ieee80211_phymode mode, int ratetype)
{
struct ifnet *ifp = ic->ic_ifp;
int minrate, maxrate;
@@ -379,7 +380,7 @@ ht_rateprint(struct ieee80211com *ic, int mode, int ratetype)
}
static void
-ht_announce(struct ieee80211com *ic, int mode)
+ht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode)
{
struct ifnet *ifp = ic->ic_ifp;
const char *modestr = ieee80211_phymode_name[mode];
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 2e388ae..4f4abad 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -2737,7 +2737,7 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211r
case IEEE80211_IOC_PROTMODE:
if (ireq->i_val > IEEE80211_PROT_RTSCTS)
return EINVAL;
- ic->ic_protmode = ireq->i_val;
+ ic->ic_protmode = (enum ieee80211_protmode)ireq->i_val;
/* NB: if not operating in 11g this can wait */
if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan))
@@ -2756,7 +2756,7 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211r
if (!(IEEE80211_ROAMING_DEVICE <= ireq->i_val &&
ireq->i_val <= IEEE80211_ROAMING_MANUAL))
return EINVAL;
- vap->iv_roaming = ireq->i_val;
+ vap->iv_roaming = (enum ieee80211_roamingmode)ireq->i_val;
/* XXXX reset? */
break;
case IEEE80211_IOC_PRIVACY:
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index 60fbacb..feb9fb8 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -228,10 +228,10 @@ struct ieee80211com {
/* virtual ap create/delete */
struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *,
- const char name[IFNAMSIZ], int unit,
- int opmode, int flags,
- const uint8_t bssid[IEEE80211_ADDR_LEN],
- const uint8_t macaddr[IEEE80211_ADDR_LEN]);
+ const char [IFNAMSIZ], int,
+ enum ieee80211_opmode, int,
+ const uint8_t [IEEE80211_ADDR_LEN],
+ const uint8_t [IEEE80211_ADDR_LEN]);
void (*ic_vap_delete)(struct ieee80211vap *);
/* operating mode attachment */
ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX];
@@ -662,7 +662,8 @@ void ieee80211_ifattach(struct ieee80211com *,
const uint8_t macaddr[IEEE80211_ADDR_LEN]);
void ieee80211_ifdetach(struct ieee80211com *);
int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *,
- const char name[IFNAMSIZ], int unit, int opmode, int flags,
+ const char name[IFNAMSIZ], int unit,
+ enum ieee80211_opmode opmode, int flags,
const uint8_t bssid[IEEE80211_ADDR_LEN],
const uint8_t macaddr[IEEE80211_ADDR_LEN]);
int ieee80211_vap_attach(struct ieee80211vap *,
OpenPOWER on IntegriCloud