ath5k: disable HW crypto in management frame
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Fri, 14 Sep 2012 10:26:11 +0000 (18:26 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Sep 2012 19:02:08 +0000 (15:02 -0400)
Hardware support for MFP is not available in ath5k. Thus,
this implementation allows the mac80211 stack to do the
actuall crypto operation.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/mac80211-ops.c

index a0a202de110953c0808539667f0f3bfacd57173b..9fd6d9a9942ec298b81be9a8e62697df1d13c037 100644 (file)
@@ -2446,6 +2446,7 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
        hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
                        IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
                        IEEE80211_HW_SIGNAL_DBM |
+                       IEEE80211_HW_MFP_CAPABLE |
                        IEEE80211_HW_REPORTS_TX_ACK_STATUS;
 
        hw->wiphy->interface_modes =
index 4e6b39be43ff2bfb34dae157dd52891f41280f0c..7a28538e6e05ba6c001e9b04aa913955a339ac44 100644 (file)
@@ -489,6 +489,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        if (ath5k_modparam_nohwcrypt)
                return -EOPNOTSUPP;
 
+       if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT)
+               return -EOPNOTSUPP;
+
        if (vif->type == NL80211_IFTYPE_ADHOC &&
            (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
             key->cipher == WLAN_CIPHER_SUITE_CCMP) &&