iwlwifi: fix up command sending
[safe/jmp/linux-2.6] / drivers / net / wireless / iwlwifi / iwl-sta.c
index cbe4e26..1571ace 100644 (file)
@@ -98,7 +98,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
 }
 
 static int iwl_add_sta_callback(struct iwl_priv *priv,
-                                  struct iwl_cmd *cmd, struct sk_buff *skb)
+                               struct iwl_device_cmd *cmd,
+                               struct sk_buff *skb)
 {
        struct iwl_rx_packet *res = NULL;
        struct iwl_addsta_cmd *addsta =
@@ -139,14 +140,14 @@ int iwl_send_add_sta(struct iwl_priv *priv,
        u8 data[sizeof(*sta)];
        struct iwl_host_cmd cmd = {
                .id = REPLY_ADD_STA,
-               .meta.flags = flags,
+               .flags = flags,
                .data = data,
        };
 
        if (flags & CMD_ASYNC)
-               cmd.meta.u.callback = iwl_add_sta_callback;
+               cmd.callback = iwl_add_sta_callback;
        else
-               cmd.meta.flags |= CMD_WANT_SKB;
+               cmd.flags |= CMD_WANT_SKB;
 
        cmd.len = priv->cfg->ops->utils->build_addsta_hcmd(sta, data);
        ret = iwl_send_cmd(priv, &cmd);
@@ -154,7 +155,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,
        if (ret || (flags & CMD_ASYNC))
                return ret;
 
-       res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
+       res = (struct iwl_rx_packet *)cmd.reply_skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
                IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
                          res->hdr.flags);
@@ -175,7 +176,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,
        }
 
        priv->alloc_rxb_skb--;
-       dev_kfree_skb_any(cmd.meta.u.skb);
+       dev_kfree_skb_any(cmd.reply_skb);
 
        return ret;
 }
@@ -325,7 +326,8 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
 }
 
 static int iwl_remove_sta_callback(struct iwl_priv *priv,
-                                  struct iwl_cmd *cmd, struct sk_buff *skb)
+                                  struct iwl_device_cmd *cmd,
+                                  struct sk_buff *skb)
 {
        struct iwl_rx_packet *res = NULL;
        struct iwl_rem_sta_cmd *rm_sta =
@@ -368,7 +370,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
        struct iwl_host_cmd cmd = {
                .id = REPLY_REMOVE_STA,
                .len = sizeof(struct iwl_rem_sta_cmd),
-               .meta.flags = flags,
+               .flags = flags,
                .data = &rm_sta_cmd,
        };
 
@@ -377,15 +379,15 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
        memcpy(&rm_sta_cmd.addr, addr , ETH_ALEN);
 
        if (flags & CMD_ASYNC)
-               cmd.meta.u.callback = iwl_remove_sta_callback;
+               cmd.callback = iwl_remove_sta_callback;
        else
-               cmd.meta.flags |= CMD_WANT_SKB;
+               cmd.flags |= CMD_WANT_SKB;
        ret = iwl_send_cmd(priv, &cmd);
 
        if (ret || (flags & CMD_ASYNC))
                return ret;
 
-       res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
+       res = (struct iwl_rx_packet *)cmd.reply_skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
                IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n",
                          res->hdr.flags);
@@ -406,7 +408,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
        }
 
        priv->alloc_rxb_skb--;
-       dev_kfree_skb_any(cmd.meta.u.skb);
+       dev_kfree_skb_any(cmd.reply_skb);
 
        return ret;
 }
@@ -525,7 +527,7 @@ int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
        struct iwl_host_cmd cmd = {
                .id = REPLY_WEPKEY,
                .data = wep_cmd,
-               .meta.flags = CMD_ASYNC,
+               .flags = CMD_ASYNC,
        };
 
        memset(wep_cmd, 0, cmd_size +
@@ -930,7 +932,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv,
        struct iwl_host_cmd cmd = {
                .id = REPLY_TX_LINK_QUALITY_CMD,
                .len = sizeof(struct iwl_link_quality_cmd),
-               .meta.flags = flags,
+               .flags = flags,
                .data = lq,
        };