aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-12-11 13:49:39 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:45 -0500
commitddac452680a5164bb47d61ea54f596ddaf3aea7d (patch)
tree8aae999ecedd85ca14dd5dfeeb832d46cc7c1b76 /drivers/net/wireless/libertas/cmdresp.c
parentc9cd6f9d630c4422d5f7eb8018b28846e25dba20 (diff)
libertas: rename and re-type bufvirtualaddr to cmdbuf
Make it a struct cmd_header, since that's what it is, and clean up the places that it's used. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 671e323764c8..b4cd7b79f54f 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -491,8 +491,9 @@ static int lbs_ret_802_11_subscribe_event(struct lbs_private *priv,
491 491
492static inline int handle_cmd_response(struct lbs_private *priv, 492static inline int handle_cmd_response(struct lbs_private *priv,
493 unsigned long dummy, 493 unsigned long dummy,
494 struct cmd_ds_command *resp) 494 struct cmd_header *cmd_response)
495{ 495{
496 struct cmd_ds_command *resp = (struct cmd_ds_command *) cmd_response;
496 int ret = 0; 497 int ret = 0;
497 unsigned long flags; 498 unsigned long flags;
498 uint16_t respcmd = le16_to_cpu(resp->command); 499 uint16_t respcmd = le16_to_cpu(resp->command);
@@ -673,7 +674,7 @@ static inline int handle_cmd_response(struct lbs_private *priv,
673int lbs_process_rx_command(struct lbs_private *priv) 674int lbs_process_rx_command(struct lbs_private *priv)
674{ 675{
675 u16 respcmd; 676 u16 respcmd;
676 struct cmd_ds_command *resp; 677 struct cmd_header *resp;
677 int ret = 0; 678 int ret = 0;
678 ulong flags; 679 ulong flags;
679 u16 result; 680 u16 result;
@@ -692,15 +693,14 @@ int lbs_process_rx_command(struct lbs_private *priv)
692 spin_unlock_irqrestore(&priv->driver_lock, flags); 693 spin_unlock_irqrestore(&priv->driver_lock, flags);
693 goto done; 694 goto done;
694 } 695 }
695 resp = (struct cmd_ds_command *)(priv->cur_cmd->bufvirtualaddr); 696 resp = priv->cur_cmd->cmdbuf;
696 697
697 respcmd = le16_to_cpu(resp->command); 698 respcmd = le16_to_cpu(resp->command);
698 result = le16_to_cpu(resp->result); 699 result = le16_to_cpu(resp->result);
699 700
700 lbs_deb_host("CMD_RESP: response 0x%04x, size %d, jiffies %lu\n", 701 lbs_deb_host("CMD_RESP: response 0x%04x, size %d, jiffies %lu\n",
701 respcmd, priv->upld_len, jiffies); 702 respcmd, priv->upld_len, jiffies);
702 lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", priv->cur_cmd->bufvirtualaddr, 703 lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
703 priv->upld_len);
704 704
705 if (!(respcmd & 0x8000)) { 705 if (!(respcmd & 0x8000)) {
706 lbs_deb_host("invalid response!\n"); 706 lbs_deb_host("invalid response!\n");
@@ -716,7 +716,7 @@ int lbs_process_rx_command(struct lbs_private *priv)
716 priv->cur_cmd_retcode = result; 716 priv->cur_cmd_retcode = result;
717 717
718 if (respcmd == CMD_RET(CMD_802_11_PS_MODE)) { 718 if (respcmd == CMD_RET(CMD_802_11_PS_MODE)) {
719 struct cmd_ds_802_11_ps_mode *psmode = &resp->params.psmode; 719 struct cmd_ds_802_11_ps_mode *psmode = (void *) resp;
720 u16 action = le16_to_cpu(psmode->action); 720 u16 action = le16_to_cpu(psmode->action);
721 721
722 lbs_deb_host( 722 lbs_deb_host(
@@ -796,7 +796,7 @@ int lbs_process_rx_command(struct lbs_private *priv)
796 796
797 if (priv->cur_cmd && priv->cur_cmd->callback) { 797 if (priv->cur_cmd && priv->cur_cmd->callback) {
798 ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, 798 ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg,
799 (struct cmd_header *) resp); 799 resp);
800 } else 800 } else
801 ret = handle_cmd_response(priv, 0, resp); 801 ret = handle_cmd_response(priv, 0, resp);
802 802