@@ -177,5 +177,7 @@ int ath_key_config(struct ath_common *common,
bool ath_hw_keyreset(struct ath_common *common, u16 entry);
void ath_hw_cycle_counters_update(struct ath_common *common);
int32_t ath_hw_get_listen_time(struct ath_common *common);
+int ath_txbf_key_config(struct ath_common *common,
+ struct ieee80211_sta *sta);
#endif /* ATH_H */
@@ -115,6 +115,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,
void *ah = common->ah;
u32 key0, key1, key2, key3, key4;
u32 keyType;
+ u32 txbf = 0;
if (entry >= common->keymax) {
ath_print(common, ATH_DBG_FATAL,
@@ -199,6 +200,9 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,
REG_WRITE(ah, AR_KEYTABLE_KEY4(entry), key4);
REG_WRITE(ah, AR_KEYTABLE_TYPE(entry), keyType);
+ REG_WRITE(ah, AR_KEYTABLE_TYPE(entry),
+ keyType | txbf);
+
/* Write MAC address for the entry */
(void) ath_hw_keysetmac(common, entry, mac);
@@ -435,6 +439,31 @@ static int ath_reserve_key_cache_slot(struct ath_common *common,
return -1;
}
+int ath_txbf_key_config(struct ath_common *common, struct ieee80211_sta *sta)
+{
+ int idx, ret;
+ struct ath_keyval hk;
+
+ if (WARN_ON(!sta))
+ return -EOPNOTSUPP;
+
+ memset(&hk, 0, sizeof(hk));
+ hk.kv_type = ATH_CIPHER_CLR;
+
+ idx = ath_reserve_key_cache_slot(common, 0);
+
+ if (idx < 0)
+ return -ENOSPC;
+
+ ret = ath_hw_set_keycache_entry(common, idx, &hk, sta->addr);
+
+ if (!ret)
+ return -EIO;
+
+ return idx;
+}
+EXPORT_SYMBOL(ath_txbf_key_config);
+
/*
* Configure encryption in the HW.
*/