aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-03-23 08:52:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-03-30 14:15:18 -0400
commitcfdc9a8bb8d90c6aa212a5a881862599673c443d (patch)
tree7332e1d3eac1262be1241055ddc7573e6af27e50 /drivers/net
parentc944daf46a8cfa50d6c1f54d4842180d0384c594 (diff)
ath9k: Support RSN IBSS
Add support for using RSN IBSS with ath9k. For now, this uses software crypto for group addressed frames in RSN IBSS, but that may be optimized in the future by extending the key cache design to support per-STA RX GTK. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index cdb0f1c89a0e..b590a9e7943a 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -690,6 +690,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
690 if (AR_SREV_5416(sc->sc_ah)) 690 if (AR_SREV_5416(sc->sc_ah))
691 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 691 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
692 692
693 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
694
693 hw->queues = 4; 695 hw->queues = 4;
694 hw->max_rates = 4; 696 hw->max_rates = 4;
695 hw->channel_change_time = 5000; 697 hw->channel_change_time = 5000;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 524825720a09..3c5de73dcb4b 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1845,6 +1845,20 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
1845 if (ath9k_modparam_nohwcrypt) 1845 if (ath9k_modparam_nohwcrypt)
1846 return -ENOSPC; 1846 return -ENOSPC;
1847 1847
1848 if (vif->type == NL80211_IFTYPE_ADHOC &&
1849 (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
1850 key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
1851 !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
1852 /*
1853 * For now, disable hw crypto for the RSN IBSS group keys. This
1854 * could be optimized in the future to use a modified key cache
1855 * design to support per-STA RX GTK, but until that gets
1856 * implemented, use of software crypto for group addressed
1857 * frames is a acceptable to allow RSN IBSS to be used.
1858 */
1859 return -EOPNOTSUPP;
1860 }
1861
1848 mutex_lock(&sc->mutex); 1862 mutex_lock(&sc->mutex);
1849 ath9k_ps_wakeup(sc); 1863 ath9k_ps_wakeup(sc);
1850 ath_dbg(common, ATH_DBG_CONFIG, "Set HW Key\n"); 1864 ath_dbg(common, ATH_DBG_CONFIG, "Set HW Key\n");