diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2005-04-12 17:56:43 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2005-04-12 17:56:43 +0000 |
| commit | 8ca623d734f6337655fa78a0407006419434567e (patch) | |
| tree | e4384bc5f41ebbc0117ea105fc1dc18d89e2200f /sys/dev | |
| parent | dd70e17b1256153955c0d61653aef0786874797a (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ath/if_ath.c | 29 | ||||
| -rw-r--r-- | sys/dev/ath/if_athvar.h | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 93f318b41d9b1..f6553006492c0 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1453,6 +1453,35 @@ ath_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k) struct ath_softc *sc = ic->ic_ifp->if_softc; /* + * Group key allocation must be handled specially for + * parts that do not support multicast key cache search + * functionality. For those parts the key id must match + * the h/w key index so lookups find the right key. On + * parts w/ the key search facility we install the sender's + * mac address (with the high bit set) and let the hardware + * find the key w/o using the key id. This is preferred as + * it permits us to support multiple users for adhoc and/or + * multi-station operation. + */ + if ((k->wk_flags & IEEE80211_KEY_GROUP) && !sc->sc_mcastkey) { + u_int keyix; + + if (!(&ic->ic_nw_keys[0] <= k && + k < &ic->ic_nw_keys[IEEE80211_WEP_NKID])) { + /* should not happen */ + DPRINTF(sc, ATH_DEBUG_KEYCACHE, + "%s: bogus group key\n", __func__); + return IEEE80211_KEYIX_NONE; + } + keyix = k - ic->ic_nw_keys; + /* + * XXX we pre-allocate the global keys so + * have no way to check if they've already been allocated. + */ + return keyix; + } + + /* * We allocate two pair for TKIP when using the h/w to do * the MIC. For everything else, including software crypto, * we allocate a single entry. Note that s/w crypto requires diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 74f79bc09d470..5d7a162364d0f 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -188,7 +188,8 @@ struct ath_softc { sc_hasveol : 1, /* tx VEOL support */ sc_hastpc : 1, /* per-packet TPC support */ sc_ledstate: 1, /* LED on/off state */ - sc_blinking: 1; /* LED blink operation active */ + sc_blinking: 1, /* LED blink operation active */ + sc_mcastkey: 1; /* mcast key cache search */ /* rate tables */ const HAL_RATE_TABLE *sc_rates[IEEE80211_MODE_MAX]; const HAL_RATE_TABLE *sc_currates; /* current rate table */ |
