Date: Mon, 26 May 2008 22:35:57 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142324 for review Message-ID: <200805262235.m4QMZvjo003945@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142324 Change 142324 by sam@sam_ebb on 2008/05/26 22:35:11 use the newly added wk_macaddr to eliminate a hack Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#76 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#76 (text+ko) ==== @@ -139,7 +139,6 @@ static void ath_bmiss_vap(struct ieee80211vap *); static void ath_bmiss_proc(void *, int); static int ath_keyset(struct ath_softc *, const struct ieee80211_key *, - const u_int8_t [IEEE80211_ADDR_LEN], struct ieee80211_node *); static int ath_key_alloc(struct ieee80211vap *, const struct ieee80211_key *, @@ -1078,7 +1077,7 @@ return; k = &ni->ni_ucastkey; if (k->wk_keyix != IEEE80211_KEYIX_NONE) - ath_keyset(sc, k, ni->ni_macaddr, vap->iv_bss); + ath_keyset(sc, k, vap->iv_bss); } /* @@ -1108,11 +1107,8 @@ continue; for (i = 0; i < IEEE80211_WEP_NKID; i++) { const struct ieee80211_key *k = &vap->iv_nw_keys[i]; - if (k->wk_keyix == IEEE80211_KEYIX_NONE) - continue; - /* XXX group keys need bcast addr, should be in key */ - ath_keyset(sc, k, k->wk_flags & IEEE80211_KEY_GROUP ? - ifp->if_broadcastaddr : vap->iv_myaddr, vap->iv_bss); + if (k->wk_keyix != IEEE80211_KEYIX_NONE) + ath_keyset(sc, k, vap->iv_bss); } } /* @@ -2225,7 +2221,6 @@ */ static int ath_keyset(struct ath_softc *sc, const struct ieee80211_key *k, - const u_int8_t mac0[IEEE80211_ADDR_LEN], struct ieee80211_node *bss) { #define N(a) (sizeof(a)/sizeof(a[0])) @@ -2269,7 +2264,7 @@ gmac[0] |= 0x80; mac = gmac; } else - mac = mac0; + mac = k->wk_macaddr; if (hk.kv_type == HAL_CIPHER_TKIP && (k->wk_flags & IEEE80211_KEY_SWMIC) == 0) { @@ -2528,7 +2523,7 @@ { struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; - return ath_keyset(sc, k, mac, vap->iv_bss); + return ath_keyset(sc, k, vap->iv_bss); } /* @@ -5850,8 +5845,9 @@ /* XXX locking? */ ni->ni_ucastkey.wk_keyix = keyix; ni->ni_ucastkey.wk_rxkeyix = rxkeyix; + IEEE80211_ADDR_COPY(ni->ni_ucastkey.wk_macaddr, ni->ni_macaddr); /* NB: this will create a pass-thru key entry */ - ath_keyset(sc, &ni->ni_ucastkey, ni->ni_macaddr, vap->iv_bss); + ath_keyset(sc, &ni->ni_ucastkey, vap->iv_bss); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805262235.m4QMZvjo003945>