iwmc3200wifi: WPS support
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 16 Oct 2009 05:18:47 +0000 (13:18 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Oct 2009 20:48:24 +0000 (16:48 -0400)
By setting the WSC profile flag, we now support WPS as an enrollee.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwmc3200wifi/cfg80211.c
drivers/net/wireless/iwmc3200wifi/commands.h

index 703edb30c269a23bc706ac4306c9cc40edd4da35..ca75d07831a975bae968c235126b6f6133c0e999 100644 (file)
@@ -627,6 +627,13 @@ static int iwm_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
                iwm->default_key = sme->key_idx;
        }
 
+       /* WPA and open AUTH type from wpa_s means WPS (a.k.a. WSC) */
+       if ((iwm->umac_profile->sec.flags &
+            (UMAC_SEC_FLG_WPA_ON_MSK | UMAC_SEC_FLG_RSNA_ON_MSK)) &&
+           iwm->umac_profile->sec.auth_type == UMAC_AUTH_TYPE_OPEN) {
+                       iwm->umac_profile->sec.flags = UMAC_SEC_FLG_WSC_ON_MSK;
+       }
+
        ret = iwm_send_mlme_profile(iwm);
 
        if (iwm->umac_profile->sec.auth_type != UMAC_AUTH_TYPE_LEGACY_PSK ||
index e24d5b6339977fd70933806d0c03223d01aa1fa3..4e183be1f26272cfe526781b50d199855619abe9 100644 (file)
@@ -288,6 +288,9 @@ struct iwm_umac_cmd_scan_request {
 /* iwm_umac_security.flag is WSC mode on -- bits [2:2] */
 #define UMAC_SEC_FLG_WSC_ON_POS                2
 #define UMAC_SEC_FLG_WSC_ON_SEED       1
+#define UMAC_SEC_FLG_WSC_ON_MSK         (UMAC_SEC_FLG_WSC_ON_SEED << \
+                                        UMAC_SEC_FLG_WSC_ON_POS)
+
 
 /* Legacy profile can use only WEP40 and WEP104 for encryption and
  * OPEN or PSK for authentication */