ath: Modify ath_key_delete() to not need full key entry
[sfrench/cifs-2.6.git] / drivers / net / wireless / ath / ath9k / main.c
index 10b87aa1d28954c1efe1f916b83ae80f18ef5df5..bcdf150060f27c596a28c469424ff96a33a05cdd 100644 (file)
@@ -1543,12 +1543,11 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
 {
        struct ath_common *common = ath9k_hw_common(sc->sc_ah);
        struct ath_node *an = (struct ath_node *) sta->drv_priv;
-       struct ieee80211_key_conf ps_key = { .hw_key_idx = an->ps_key };
 
        if (!an->ps_key)
            return;
 
-       ath_key_delete(common, &ps_key);
+       ath_key_delete(common, an->ps_key);
        an->ps_key = 0;
        an->key_idx[0] = 0;
 }
@@ -1748,7 +1747,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
                }
                break;
        case DISABLE_KEY:
-               ath_key_delete(common, key);
+               ath_key_delete(common, key->hw_key_idx);
                if (an) {
                        for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) {
                                if (an->key_idx[i] != key->hw_key_idx)