Page MenuHomeFreeBSD

D3657.id9108.diff
No OneTemporary

D3657.id9108.diff

Index: head/sys/dev/ath/if_ath_keycache.h
===================================================================
--- head/sys/dev/ath/if_ath_keycache.h
+++ head/sys/dev/ath/if_ath_keycache.h
@@ -35,8 +35,7 @@
extern int ath_key_alloc(struct ieee80211vap *, struct ieee80211_key *,
ieee80211_keyix *, ieee80211_keyix *);
extern int ath_key_delete(struct ieee80211vap *, const struct ieee80211_key *);
-extern int ath_key_set(struct ieee80211vap *, const struct ieee80211_key *,
- const u_int8_t mac[IEEE80211_ADDR_LEN]);
+extern int ath_key_set(struct ieee80211vap *, const struct ieee80211_key *);
extern int ath_keyset(struct ath_softc *sc, struct ieee80211vap *vap,
const struct ieee80211_key *k, struct ieee80211_node *bss);
Index: head/sys/dev/ath/if_ath_keycache.c
===================================================================
--- head/sys/dev/ath/if_ath_keycache.c
+++ head/sys/dev/ath/if_ath_keycache.c
@@ -527,8 +527,7 @@
* slot(s) must already have been allocated by ath_key_alloc.
*/
int
-ath_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
- const u_int8_t mac[IEEE80211_ADDR_LEN])
+ath_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
{
struct ath_softc *sc = vap->iv_ic->ic_softc;
Index: head/sys/dev/if_ndis/if_ndis.c
===================================================================
--- head/sys/dev/if_ndis/if_ndis.c
+++ head/sys/dev/if_ndis/if_ndis.c
@@ -194,7 +194,7 @@
static int ndis_set_cipher (struct ndis_softc *, int);
static int ndis_set_wpa (struct ndis_softc *, void *, int);
static int ndis_add_key (struct ieee80211vap *,
- const struct ieee80211_key *, const u_int8_t []);
+ const struct ieee80211_key *);
static int ndis_del_key (struct ieee80211vap *,
const struct ieee80211_key *);
static void ndis_setmulti (struct ndis_softc *);
@@ -3070,8 +3070,7 @@
* set after initial authentication with the AP.
*/
static int
-ndis_add_key(struct ieee80211vap *vap, const struct ieee80211_key *key,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+ndis_add_key(struct ieee80211vap *vap, const struct ieee80211_key *key)
{
struct ndis_softc *sc = vap->iv_ic->ic_softc;
ndis_80211_key rkey;
Index: head/sys/dev/mwl/if_mwl.c
===================================================================
--- head/sys/dev/mwl/if_mwl.c
+++ head/sys/dev/mwl/if_mwl.c
@@ -111,7 +111,10 @@
ieee80211_keyix *, ieee80211_keyix *);
static int mwl_key_delete(struct ieee80211vap *,
const struct ieee80211_key *);
-static int mwl_key_set(struct ieee80211vap *, const struct ieee80211_key *,
+static int mwl_key_set(struct ieee80211vap *,
+ const struct ieee80211_key *);
+static int _mwl_key_set(struct ieee80211vap *,
+ const struct ieee80211_key *,
const uint8_t mac[IEEE80211_ADDR_LEN]);
static int mwl_mode_init(struct mwl_softc *);
static void mwl_update_mcast(struct ieee80211com *);
@@ -1604,7 +1607,13 @@
* slot(s) must already have been allocated by mwl_key_alloc.
*/
static int
-mwl_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
+mwl_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
+{
+ return (_mwl_key_set(vap, k, k->wk_macaddr));
+}
+
+static int
+_mwl_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
const uint8_t mac[IEEE80211_ADDR_LEN])
{
#define GRPXMIT (IEEE80211_KEY_XMIT | IEEE80211_KEY_GROUP)
@@ -3911,7 +3920,8 @@
IEEE80211_F_PRIVACY &&
vap->iv_def_txkey != IEEE80211_KEYIX_NONE &&
vap->iv_nw_keys[vap->iv_def_txkey].wk_keyix != IEEE80211_KEYIX_NONE)
- (void) mwl_key_set(vap, &vap->iv_nw_keys[vap->iv_def_txkey], mac);
+ (void) _mwl_key_set(vap, &vap->iv_nw_keys[vap->iv_def_txkey],
+ mac);
}
static int
@@ -3956,7 +3966,7 @@
wk = &vap->iv_nw_keys[0];
for (; wk < &vap->iv_nw_keys[IEEE80211_WEP_NKID]; wk++)
if (wk->wk_keyix != IEEE80211_KEYIX_NONE)
- (void) mwl_key_set(vap, wk, vap->iv_myaddr);
+ (void) _mwl_key_set(vap, wk, vap->iv_myaddr);
}
/*
Index: head/sys/dev/usb/wlan/if_rum.c
===================================================================
--- head/sys/dev/usb/wlan/if_rum.c
+++ head/sys/dev/usb/wlan/if_rum.c
@@ -249,8 +249,7 @@
struct ieee80211_key *, ieee80211_keyix *,
ieee80211_keyix *);
static int rum_key_set(struct ieee80211vap *,
- const struct ieee80211_key *,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const struct ieee80211_key *);
static int rum_key_delete(struct ieee80211vap *,
const struct ieee80211_key *);
static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *,
@@ -2659,8 +2658,7 @@
}
static int
-rum_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+rum_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
{
struct rum_softc *sc = vap->iv_ic->ic_softc;
int group;
Index: head/sys/dev/usb/wlan/if_run.c
===================================================================
--- head/sys/dev/usb/wlan/if_run.c
+++ head/sys/dev/usb/wlan/if_run.c
@@ -382,8 +382,7 @@
static int run_wme_update(struct ieee80211com *);
static void run_wme_update_cb(void *);
static void run_key_set_cb(void *);
-static int run_key_set(struct ieee80211vap *, struct ieee80211_key *,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+static int run_key_set(struct ieee80211vap *, struct ieee80211_key *);
static void run_key_delete_cb(void *);
static int run_key_delete(struct ieee80211vap *, struct ieee80211_key *);
static void run_ratectl_to(void *);
@@ -2361,8 +2360,7 @@
* return 0 on error
*/
static int
-run_key_set(struct ieee80211vap *vap, struct ieee80211_key *k,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+run_key_set(struct ieee80211vap *vap, struct ieee80211_key *k)
{
struct ieee80211com *ic = vap->iv_ic;
struct run_softc *sc = ic->ic_softc;
@@ -2374,7 +2372,7 @@
sc->cmdq[i].arg0 = NULL;
sc->cmdq[i].arg1 = vap;
sc->cmdq[i].k = k;
- IEEE80211_ADDR_COPY(sc->cmdq[i].mac, mac);
+ IEEE80211_ADDR_COPY(sc->cmdq[i].mac, k->wk_macaddr);
ieee80211_runtask(ic, &sc->cmdq_task);
/*
Index: head/sys/dev/wpi/if_wpi.c
===================================================================
--- head/sys/dev/wpi/if_wpi.c
+++ head/sys/dev/wpi/if_wpi.c
@@ -254,8 +254,7 @@
static int wpi_process_key(struct ieee80211vap *,
const struct ieee80211_key *, int);
static int wpi_key_set(struct ieee80211vap *,
- const struct ieee80211_key *,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const struct ieee80211_key *);
static int wpi_key_delete(struct ieee80211vap *,
const struct ieee80211_key *);
static int wpi_post_alive(struct wpi_softc *);
@@ -4799,8 +4798,7 @@
}
static int
-wpi_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+wpi_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
{
return wpi_process_key(vap, k, 1);
}
Index: head/sys/net80211/ieee80211_crypto.c
===================================================================
--- head/sys/net80211/ieee80211_crypto.c
+++ head/sys/net80211/ieee80211_crypto.c
@@ -89,8 +89,7 @@
return 1;
}
static int
-null_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+null_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k)
{
return 1;
}
@@ -132,7 +131,7 @@
static __inline int
dev_key_set(struct ieee80211vap *vap, const struct ieee80211_key *key)
{
- return vap->iv_key_set(vap, key, key->wk_macaddr);
+ return vap->iv_key_set(vap, key);
}
/*
Index: head/sys/net80211/ieee80211_var.h
===================================================================
--- head/sys/net80211/ieee80211_var.h
+++ head/sys/net80211/ieee80211_var.h
@@ -461,8 +461,7 @@
int (*iv_key_delete)(struct ieee80211vap *,
const struct ieee80211_key *);
int (*iv_key_set)(struct ieee80211vap *,
- const struct ieee80211_key *,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const struct ieee80211_key *);
void (*iv_key_update_begin)(struct ieee80211vap *);
void (*iv_key_update_end)(struct ieee80211vap *);

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 5:51 AM (9 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31014022
Default Alt Text
D3657.id9108.diff (7 KB)

Event Timeline