Loading net/mac80211/cfg.c +1 −1 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, goto out_unlock; } __ieee80211_key_free(key, true); ieee80211_key_free(key, true); ret = 0; out_unlock: Loading net/mac80211/key.c +14 −14 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, } static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, static void ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, bool pairwise, struct ieee80211_key *old, Loading Loading @@ -406,7 +406,7 @@ static void ieee80211_key_free_common(struct ieee80211_key *key) kfree(key); } static void __ieee80211_key_destroy(struct ieee80211_key *key, static void ieee80211_key_destroy(struct ieee80211_key *key, bool delay_tailroom) { if (!key) Loading Loading @@ -473,22 +473,22 @@ int ieee80211_key_link(struct ieee80211_key *key, increment_tailroom_need_count(sdata); __ieee80211_key_replace(sdata, sta, pairwise, old_key, key); __ieee80211_key_destroy(old_key, true); ieee80211_key_replace(sdata, sta, pairwise, old_key, key); ieee80211_key_destroy(old_key, true); ieee80211_debugfs_key_add(key); ret = ieee80211_key_enable_hw_accel(key); if (ret) __ieee80211_key_free(key, true); ieee80211_key_free(key, true); mutex_unlock(&sdata->local->key_mtx); return ret; } void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) { if (!key) return; Loading @@ -497,10 +497,10 @@ void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) * Replace key with nothingness if it was ever used. */ if (key->sdata) __ieee80211_key_replace(key->sdata, key->sta, ieee80211_key_replace(key->sdata, key->sta, key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, key, NULL); __ieee80211_key_destroy(key, delay_tailroom); ieee80211_key_destroy(key, delay_tailroom); } void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata) Loading Loading @@ -572,7 +572,7 @@ void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata) ieee80211_debugfs_key_remove_mgmt_default(sdata); list_for_each_entry_safe(key, tmp, &sdata->key_list, list) __ieee80211_key_free(key, false); ieee80211_key_free(key, false); ieee80211_debugfs_key_update_default(sdata); Loading net/mac80211/key.h +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta); void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom); void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom); void ieee80211_key_free_unused(struct ieee80211_key *key); void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx, bool uni, bool multi); Loading net/mac80211/sta_info.c +4 −4 Original line number Diff line number Diff line Loading @@ -812,10 +812,10 @@ int __must_check __sta_info_destroy(struct sta_info *sta) mutex_lock(&local->key_mtx); for (i = 0; i < NUM_DEFAULT_KEYS; i++) __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]), ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]), true); if (sta->ptk) __ieee80211_key_free(key_mtx_dereference(local, sta->ptk), ieee80211_key_free(key_mtx_dereference(local, sta->ptk), true); mutex_unlock(&local->key_mtx); Loading Loading
net/mac80211/cfg.c +1 −1 Original line number Diff line number Diff line Loading @@ -252,7 +252,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, goto out_unlock; } __ieee80211_key_free(key, true); ieee80211_key_free(key, true); ret = 0; out_unlock: Loading
net/mac80211/key.c +14 −14 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, } static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, static void ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, bool pairwise, struct ieee80211_key *old, Loading Loading @@ -406,7 +406,7 @@ static void ieee80211_key_free_common(struct ieee80211_key *key) kfree(key); } static void __ieee80211_key_destroy(struct ieee80211_key *key, static void ieee80211_key_destroy(struct ieee80211_key *key, bool delay_tailroom) { if (!key) Loading Loading @@ -473,22 +473,22 @@ int ieee80211_key_link(struct ieee80211_key *key, increment_tailroom_need_count(sdata); __ieee80211_key_replace(sdata, sta, pairwise, old_key, key); __ieee80211_key_destroy(old_key, true); ieee80211_key_replace(sdata, sta, pairwise, old_key, key); ieee80211_key_destroy(old_key, true); ieee80211_debugfs_key_add(key); ret = ieee80211_key_enable_hw_accel(key); if (ret) __ieee80211_key_free(key, true); ieee80211_key_free(key, true); mutex_unlock(&sdata->local->key_mtx); return ret; } void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) { if (!key) return; Loading @@ -497,10 +497,10 @@ void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) * Replace key with nothingness if it was ever used. */ if (key->sdata) __ieee80211_key_replace(key->sdata, key->sta, ieee80211_key_replace(key->sdata, key->sta, key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, key, NULL); __ieee80211_key_destroy(key, delay_tailroom); ieee80211_key_destroy(key, delay_tailroom); } void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata) Loading Loading @@ -572,7 +572,7 @@ void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata) ieee80211_debugfs_key_remove_mgmt_default(sdata); list_for_each_entry_safe(key, tmp, &sdata->key_list, list) __ieee80211_key_free(key, false); ieee80211_key_free(key, false); ieee80211_debugfs_key_update_default(sdata); Loading
net/mac80211/key.h +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta); void __ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom); void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom); void ieee80211_key_free_unused(struct ieee80211_key *key); void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx, bool uni, bool multi); Loading
net/mac80211/sta_info.c +4 −4 Original line number Diff line number Diff line Loading @@ -812,10 +812,10 @@ int __must_check __sta_info_destroy(struct sta_info *sta) mutex_lock(&local->key_mtx); for (i = 0; i < NUM_DEFAULT_KEYS; i++) __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]), ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]), true); if (sta->ptk) __ieee80211_key_free(key_mtx_dereference(local, sta->ptk), ieee80211_key_free(key_mtx_dereference(local, sta->ptk), true); mutex_unlock(&local->key_mtx); Loading