]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/net/wireless/libertas/cmdresp.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-beck.git] / drivers / net / wireless / libertas / cmdresp.c
index f0ef7081bdeba69c4213e32e529b0477149ee3aa..63aa884b18f28546cc894b36925497aba1fd481b 100644 (file)
@@ -74,7 +74,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv)
                lbs_deb_cmd("disconnected, so exit PS mode\n");
                lbs_ps_wakeup(priv, 0);
        }
-       lbs_deb_leave(LBS_DEB_CMD);
+       lbs_deb_leave(LBS_DEB_ASSOC);
 }
 
 /**
@@ -204,61 +204,6 @@ static int lbs_ret_802_11_snmp_mib(struct lbs_private *priv,
        return 0;
 }
 
-static int lbs_ret_802_11_key_material(struct lbs_private *priv,
-                                       struct cmd_ds_command *resp)
-{
-       struct cmd_ds_802_11_key_material *pkeymaterial =
-           &resp->params.keymaterial;
-       u16 action = le16_to_cpu(pkeymaterial->action);
-
-       lbs_deb_enter(LBS_DEB_CMD);
-
-       /* Copy the returned key to driver private data */
-       if (action == CMD_ACT_GET) {
-               u8 * buf_ptr = (u8 *) &pkeymaterial->keyParamSet;
-               u8 * resp_end = (u8 *) (resp + le16_to_cpu(resp->size));
-
-               while (buf_ptr < resp_end) {
-                       struct MrvlIEtype_keyParamSet * pkeyparamset =
-                           (struct MrvlIEtype_keyParamSet *) buf_ptr;
-                       struct enc_key * pkey;
-                       u16 param_set_len = le16_to_cpu(pkeyparamset->length);
-                       u16 key_len = le16_to_cpu(pkeyparamset->keylen);
-                       u16 key_flags = le16_to_cpu(pkeyparamset->keyinfo);
-                       u16 key_type = le16_to_cpu(pkeyparamset->keytypeid);
-                       u8 * end;
-
-                       end = (u8 *) pkeyparamset + sizeof (pkeyparamset->type)
-                                                 + sizeof (pkeyparamset->length)
-                                                 + param_set_len;
-                       /* Make sure we don't access past the end of the IEs */
-                       if (end > resp_end)
-                               break;
-
-                       if (key_flags & KEY_INFO_WPA_UNICAST)
-                               pkey = &priv->wpa_unicast_key;
-                       else if (key_flags & KEY_INFO_WPA_MCAST)
-                               pkey = &priv->wpa_mcast_key;
-                       else
-                               break;
-
-                       /* Copy returned key into driver */
-                       memset(pkey, 0, sizeof(struct enc_key));
-                       if (key_len > sizeof(pkey->key))
-                               break;
-                       pkey->type = key_type;
-                       pkey->flags = key_flags;
-                       pkey->len = key_len;
-                       memcpy(pkey->key, pkeyparamset->key, pkey->len);
-
-                       buf_ptr = end + 1;
-               }
-       }
-
-       lbs_deb_enter(LBS_DEB_CMD);
-       return 0;
-}
-
 static int lbs_ret_802_11_mac_address(struct lbs_private *priv,
                                       struct cmd_ds_command *resp)
 {
@@ -407,10 +352,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
                ret = lbs_ret_reg_access(priv, respcmd, resp);
                break;
 
-       case CMD_RET(CMD_802_11_SCAN):
-               ret = lbs_ret_80211_scan(priv, resp);
-               break;
-
        case CMD_RET(CMD_802_11_GET_LOG):
                ret = lbs_ret_get_log(priv, resp);
                break;
@@ -475,10 +416,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
                ret = lbs_ret_80211_ad_hoc_stop(priv, resp);
                break;
 
-       case CMD_RET(CMD_802_11_KEY_MATERIAL):
-               ret = lbs_ret_802_11_key_material(priv, resp);
-               break;
-
        case CMD_RET(CMD_802_11_EEPROM_ACCESS):
                ret = lbs_ret_802_11_eeprom_access(priv, resp);
                break;
@@ -566,9 +503,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
        respcmd = le16_to_cpu(resp->command);
        result = le16_to_cpu(resp->result);
 
-       lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
+       lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
                     respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
-       lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
+       lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
 
        if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
                lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",