Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / drivers / net / wireless / libertas / assoc.c
index d699737..1902b6f 100644 (file)
@@ -127,7 +127,6 @@ static int lbs_set_authentication(struct lbs_private *priv, u8 bssid[6], u8 auth
 {
        struct cmd_ds_802_11_authenticate cmd;
        int ret = -1;
-       DECLARE_MAC_BUF(mac);
 
        lbs_deb_enter(LBS_DEB_JOIN);
 
@@ -136,8 +135,7 @@ static int lbs_set_authentication(struct lbs_private *priv, u8 bssid[6], u8 auth
 
        cmd.authtype = iw_auth_to_ieee_auth(auth);
 
-       lbs_deb_join("AUTH_CMD: BSSID %s, auth 0x%x\n",
-               print_mac(mac, bssid), cmd.authtype);
+       lbs_deb_join("AUTH_CMD: BSSID %pM, auth 0x%x\n", bssid, cmd.authtype);
 
        ret = lbs_cmd_with_response(priv, CMD_802_11_AUTHENTICATE, &cmd);
 
@@ -340,8 +338,6 @@ static int lbs_associate(struct lbs_private *priv,
 
        /* Firmware v9+ indicate authentication suites as a TLV */
        if (priv->fwrelease >= 0x09000000) {
-               DECLARE_MAC_BUF(mac);
-
                auth = (struct mrvl_ie_auth_type *) pos;
                auth->header.type = cpu_to_le16(TLV_TYPE_AUTH_TYPE);
                auth->header.len = cpu_to_le16(2);
@@ -349,8 +345,8 @@ static int lbs_associate(struct lbs_private *priv,
                auth->auth = cpu_to_le16(tmpauth);
                pos += sizeof(auth->header) + 2;
 
-               lbs_deb_join("AUTH_CMD: BSSID %s, auth 0x%x\n",
-                       print_mac(mac, bss->bssid), priv->secinfo.auth_mode);
+               lbs_deb_join("AUTH_CMD: BSSID %pM, auth 0x%x\n",
+                       bss->bssid, priv->secinfo.auth_mode);
        }
 
        /* WPA/WPA2 IEs */
@@ -1366,11 +1362,17 @@ static int assoc_helper_wpa_keys(struct lbs_private *priv,
        if (ret)
                goto out;
 
+       memcpy(&priv->wpa_unicast_key, &assoc_req->wpa_unicast_key,
+                       sizeof(struct enc_key));
+
        if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
                clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
 
                ret = lbs_cmd_802_11_key_material(priv, CMD_ACT_SET, assoc_req);
                assoc_req->flags = flags;
+
+               memcpy(&priv->wpa_mcast_key, &assoc_req->wpa_mcast_key,
+                               sizeof(struct enc_key));
        }
 
 out: