Not only did I forget to export the function, it is also not easily possible to implement it without causing races. Remove it until some driver actually has a need for it. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- include/net/mac80211.h | 33 +-------------------------------- net/mac80211/key.c | 17 ----------------- 2 files changed, 1 insertion(+), 49 deletions(-) --- wireless-dev.orig/include/net/mac80211.h 2007-08-28 17:52:42.754622115 +0200 +++ wireless-dev/include/net/mac80211.h 2007-08-28 17:53:21.034622115 +0200 @@ -417,12 +417,6 @@ struct ieee80211_key_conf { /* key algorithm, ALG_NONE should never be seen by the driver */ ieee80211_key_alg alg; - /* - * for use by the driver, named this way to avoid - * accidental use in the stack - */ - struct list_head driver_keylist; - /* key flags, see above */ u8 flags; @@ -659,16 +653,6 @@ struct ieee80211_ops { * When transmitting, the TX control data will use the hw_key_idx * selected by the low-level driver. * - * If you support multiple MAC addresses but only hardware acceleration - * based on the transmitter address, you should keep a list of all - * keys that are currently enabled (use the key conf's driver_keylist - * member) and call ieee80211_key_removed() for all keys that you had - * to remove. - * Note that you should only do that if you're unable to use the key - * for transmission afterwards, if you only disabled it for reception - * you should not call ieee80211_key_removed() because that will also - * remove the key for transmission. - * * Return 0 if the key is now in use, -EOPNOTSUPP or -ENOSPC if it * couldn't be added; if you return 0 then hw_key_idx must be * assigned to something other than HW_KEY_IDX_INVALID. When the cmd @@ -680,9 +664,7 @@ struct ieee80211_ops { * * The ieee80211_key_conf structure pointed to by the key parameter * is guaranteed to be valid until another call to set_key removes - * it or until the driver calls ieee80211_key_removed(), it can - * especially be used as a cookie to differentiate transmit-only keys - * since multiple such keys may be present. + * it, but it can only be used as a cookie to differentiate keys. */ int (*set_key)(struct ieee80211_hw *hw, set_key_cmd cmd, const u8 *local_address, const u8 *address, @@ -1091,19 +1073,6 @@ ieee80211_get_mc_list_item(struct ieee80 struct dev_mc_list *prev, void **ptr); -/** - * ieee80211_key_removed - the driver removed a key from hardware accel - * - * @keyconf: The key config structure for the key that was removed. - * - * Call this function if for some reason you had to remove a key - * from the hardware acceleration completely. - * Note that after calling this function you will not get a - * DISABLE_KEY notification via set_key() any more for this key, - * it is assumed that you've removed it already. - */ -void ieee80211_key_removed(struct ieee80211_key_conf *keyconf); - /* called by driver to notify scan status completed */ void ieee80211_scan_completed(struct ieee80211_hw *hw); --- wireless-dev.orig/net/mac80211/key.c 2007-08-28 17:53:19.634622115 +0200 +++ wireless-dev/net/mac80211/key.c 2007-08-28 17:53:21.034622115 +0200 @@ -108,23 +108,6 @@ static void ieee80211_key_disable_hw_acc key->conf.hw_key_idx = HW_KEY_IDX_INVALID; } -/* - * driver notifying us that it removed a key from hw accel, - * set the software key flag. - */ -void ieee80211_key_removed(struct ieee80211_key_conf *conf) -{ - struct ieee80211_key *key = container_of(conf, struct ieee80211_key, - conf); - - WARN_ON(!conf); - if (!conf) - return; - - key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; - key->conf.hw_key_idx = HW_KEY_IDX_INVALID; -} - struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, ieee80211_key_alg alg, -- - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html