carl9170: connect to 11w protected networks
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 2 Sep 2012 12:25:50 +0000 (14:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Sep 2012 19:02:08 +0000 (15:02 -0400)
Previously, it was not possible to connect to
networks which requires 11w to be supported by
the stations.

While the documentation hints that there's some
hardware support for offloading MFP "decryption",
this simple implementation relies on the mac80211
stack to do the actual crypto operations.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/mac.c
drivers/net/wireless/ath/carl9170/main.c

index f8676280dc36669fcd5775468beefc8378823753..e3b1b6e87760ed0e70ca77dfcb23ae3e4b9df982 100644 (file)
@@ -304,7 +304,8 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
        struct ath_common *common = &ar->common;
        u8 *mac_addr, *bssid;
        u32 cam_mode = AR9170_MAC_CAM_DEFAULTS;
-       u32 enc_mode = AR9170_MAC_ENCRYPTION_DEFAULTS;
+       u32 enc_mode = AR9170_MAC_ENCRYPTION_DEFAULTS |
+               AR9170_MAC_ENCRYPTION_MGMT_RX_SOFTWARE;
        u32 rx_ctrl = AR9170_MAC_RX_CTRL_DEAGG |
                      AR9170_MAC_RX_CTRL_SHORT_FILTER;
        u32 sniffer = AR9170_MAC_SNIFFER_DEFAULTS;
index 18554ab76733cb591fccbebc8200feceeff2eac7..67997b39aba79f0d14c47ffdbe4e85248bece20b 100644 (file)
@@ -1149,6 +1149,7 @@ static int carl9170_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
                break;
        case WLAN_CIPHER_SUITE_CCMP:
                ktype = AR9170_ENC_ALG_AESCCMP;
+               key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
                break;
        default:
                return -EOPNOTSUPP;
@@ -1780,6 +1781,7 @@ void *carl9170_alloc(size_t priv_size)
        hw->wiphy->interface_modes = 0;
 
        hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS |
+                    IEEE80211_HW_MFP_CAPABLE |
                     IEEE80211_HW_REPORTS_TX_ACK_STATUS |
                     IEEE80211_HW_SUPPORTS_PS |
                     IEEE80211_HW_PS_NULLFUNC_STACK |