]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
atheros: Add support for IEEE 802.11w configuration
authorMahesh Palivela <Mahesh.Palivela@Atheros.com>
Fri, 8 Apr 2011 09:06:27 +0000 (12:06 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 8 Apr 2011 09:06:27 +0000 (12:06 +0300)
src/ap/ap_drv_ops.c
src/drivers/driver.h
src/drivers/driver_atheros.c

index 2ff3a68094c350f20638ad76edec1e7acb4670e4..0b6836c11c1afe299161ac660cfde7a6eddaa625 100644 (file)
@@ -203,6 +203,9 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname,
                params.wpa_pairwise = hapd->conf->wpa_pairwise;
                params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt;
                params.rsn_preauth = hapd->conf->rsn_preauth;
+#ifdef CONFIG_IEEE80211W
+               params.ieee80211w = hapd->conf->ieee80211w;
+#endif /* CONFIG_IEEE80211W */
        }
        return hostapd_set_ieee8021x(hapd, &params);
 }
index 8e19da14a637c0e3f849f8552fc440ff71af3c4f..8efd697ad778a66eb888505c2fabb4da76e3b42c 100644 (file)
@@ -678,6 +678,7 @@ struct wpa_bss_params {
        int wpa_pairwise;
        int wpa_key_mgmt;
        int rsn_preauth;
+       enum mfp_options ieee80211w;
 };
 
 #define WPA_STA_AUTHORIZED BIT(0)
index 8f24798a30285780eb81521e2350cf9e5f3123ac..6ac1cea6862247c1ca0124b4f8a1155f9302817d 100644 (file)
@@ -315,6 +315,14 @@ atheros_configure_wpa(struct atheros_driver_data *drv,
        v = 0;
        if (params->rsn_preauth)
                v |= BIT(0);
+#ifdef CONFIG_IEEE80211W
+       if (params->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
+               v |= BIT(7);
+               if (params->ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED)
+                       v |= BIT(6);
+       }
+#endif /* CONFIG_IEEE80211W */
+
        wpa_printf(MSG_DEBUG, "%s: rsn capabilities=0x%x",
                   __func__, params->rsn_preauth);
        if (set80211param(drv, IEEE80211_PARAM_RSNCAPS, v)) {
@@ -466,6 +474,11 @@ atheros_set_key(const char *ifname, void *priv, enum wpa_alg alg,
        case WPA_ALG_CCMP:
                cipher = IEEE80211_CIPHER_AES_CCM;
                break;
+#ifdef CONFIG_IEEE80211W
+       case WPA_ALG_IGTK:
+               cipher = IEEE80211_CIPHER_AES_CMAC;
+               break;
+#endif /* CONFIG_IEEE80211W */
        default:
                printf("%s: unknown/unsupported algorithm %d\n",
                        __func__, alg);