]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k_htc: claim support for IBSS RSN
authorAntonio Quartulli <ordex@autistici.org>
Tue, 17 Jan 2012 22:13:30 +0000 (23:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 24 Jan 2012 19:32:29 +0000 (14:32 -0500)
Skip group keys configuration in hardware in order to make IBSS RSN work.
Keys will be managed using software.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c

index 9be10a2da1c29cc48f6a96656a596c8cf6e6c5c4..fc7519c933904ac5c800b755fcd867d3b34133de 100644 (file)
@@ -741,6 +741,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
 
        hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
 
+       hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
+
        hw->queues = 4;
        hw->channel_change_time = 5000;
        hw->max_listen_interval = 10;
index ef4c6066129022d90bda90416a65bdab93d59c27..06101b6bdeac97777813820e87e53c4e350737ce 100644 (file)
@@ -1409,6 +1409,21 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
        if (htc_modparam_nohwcrypt)
                return -ENOSPC;
 
+       if ((vif->type == NL80211_IFTYPE_ADHOC ||
+            vif->type == NL80211_IFTYPE_MESH_POINT) &&
+           (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
+            key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
+           !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
+               /*
+                * For now, disable hw crypto for the RSN IBSS group keys. This
+                * could be optimized in the future to use a modified key cache
+                * design to support per-STA RX GTK, but until that gets
+                * implemented, use of software crypto for group addressed
+                * frames is a acceptable to allow RSN IBSS to be used.
+                */
+               return -EOPNOTSUPP;
+       }
+
        mutex_lock(&priv->mutex);
        ath_dbg(common, CONFIG, "Set HW Key\n");
        ath9k_htc_ps_wakeup(priv);