Merge branch 'x86/urgent' into x86/pat
[deliverable/linux.git] / drivers / net / wireless / libertas / cmd.c
index c455b9abbfc03104cabc9936f5d3a5680d9df0b3..685098148e10e137a2cf14d47d491fc7a4973975 100644 (file)
@@ -135,8 +135,14 @@ int lbs_update_hw_spec(struct lbs_private *priv)
        /* Clamp region code to 8-bit since FW spec indicates that it should
         * only ever be 8-bit, even though the field size is 16-bit.  Some firmware
         * returns non-zero high 8 bits here.
+        *
+        * Firmware version 4.0.102 used in CF8381 has region code shifted.  We
+        * need to check for this problem and handle it properly.
         */
-       priv->regioncode = le16_to_cpu(cmd.regioncode) & 0xFF;
+       if (MRVL_FW_MAJOR_REV(priv->fwrelease) == MRVL_FW_V4)
+               priv->regioncode = (le16_to_cpu(cmd.regioncode) >> 8) & 0xFF;
+       else
+               priv->regioncode = le16_to_cpu(cmd.regioncode) & 0xFF;
 
        for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
                /* use the region code to search for the index */
@@ -1220,8 +1226,7 @@ static void lbs_submit_command(struct lbs_private *priv,
        command = le16_to_cpu(cmd->command);
 
        /* These commands take longer */
-       if (command == CMD_802_11_SCAN || command == CMD_802_11_ASSOCIATE ||
-           command == CMD_802_11_AUTHENTICATE)
+       if (command == CMD_802_11_SCAN || command == CMD_802_11_ASSOCIATE)
                timeo = 5 * HZ;
 
        lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d\n",
@@ -1415,15 +1420,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
                ret = lbs_cmd_802_11_ps_mode(cmdptr, cmd_action);
                break;
 
-       case CMD_802_11_ASSOCIATE:
-       case CMD_802_11_REASSOCIATE:
-               ret = lbs_cmd_80211_associate(priv, cmdptr, pdata_buf);
-               break;
-
-       case CMD_802_11_AUTHENTICATE:
-               ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf);
-               break;
-
        case CMD_MAC_REG_ACCESS:
        case CMD_BBP_REG_ACCESS:
        case CMD_RF_REG_ACCESS:
@@ -1470,8 +1466,8 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
                break;
        case CMD_802_11_LED_GPIO_CTRL:
                {
-                       struct mrvlietypes_ledgpio *gpio =
-                           (struct mrvlietypes_ledgpio*)
+                       struct mrvl_ie_ledgpio *gpio =
+                           (struct mrvl_ie_ledgpio*)
                            cmdptr->params.ledgpio.data;
 
                        memmove(&cmdptr->params.ledgpio,
This page took 0.027575 seconds and 5 git commands to generate.