aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 39a4a70d0130..245b7308a9ad 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -204,7 +204,8 @@ static int ath_key_config(struct ath_softc *sc,
204 if (!ret) 204 if (!ret)
205 return -EIO; 205 return -EIO;
206 206
207 sc->sc_keytype = hk.kv_type; 207 if (mac)
208 sc->sc_keytype = hk.kv_type;
208 return 0; 209 return 0;
209} 210}
210 211
@@ -781,7 +782,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
781 key->hw_key_idx = key->keyidx; 782 key->hw_key_idx = key->keyidx;
782 /* push IV and Michael MIC generation to stack */ 783 /* push IV and Michael MIC generation to stack */
783 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 784 key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
784 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; 785 if (key->alg == ALG_TKIP)
786 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
785 } 787 }
786 break; 788 break;
787 case DISABLE_KEY: 789 case DISABLE_KEY: