aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-10 13:36:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:34 -0500
commit1309b55b4de18bbfe19c73225a5481d6cdc8a463 (patch)
tree7993651309a0a35f8ec954fffa0b7b04003f9d32 /drivers/net/wireless/libertas/cmdresp.c
parentb6b8abe4ddec2cfb3471ea60f965a137cd4d529d (diff)
libertas: add opaque extra argument to cmd callback function
This will be useful for letting callbacks do stuff like copying the response into a buffer provided by the caller of lbs_cmd() 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index ab6e729efacf..7bad257fd9cb 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -552,12 +552,13 @@ static int lbs_ret_802_11_subscribe_event(struct lbs_private *priv,
552 return 0; 552 return 0;
553} 553}
554 554
555static inline int handle_cmd_response(u16 respcmd, 555static inline int handle_cmd_response(struct lbs_private *priv,
556 struct cmd_ds_command *resp, 556 unsigned long dummy,
557 struct lbs_private *priv) 557 struct cmd_ds_command *resp)
558{ 558{
559 int ret = 0; 559 int ret = 0;
560 unsigned long flags; 560 unsigned long flags;
561 uint16_t respcmd = le16_to_cpu(resp->command);
561 562
562 lbs_deb_enter(LBS_DEB_HOST); 563 lbs_deb_enter(LBS_DEB_HOST);
563 564
@@ -861,9 +862,9 @@ int lbs_process_rx_command(struct lbs_private *priv)
861 spin_unlock_irqrestore(&priv->driver_lock, flags); 862 spin_unlock_irqrestore(&priv->driver_lock, flags);
862 863
863 if (priv->cur_cmd && priv->cur_cmd->callback) 864 if (priv->cur_cmd && priv->cur_cmd->callback)
864 ret = priv->cur_cmd->callback(respcmd, resp, priv); 865 ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, resp);
865 else 866 else
866 ret = handle_cmd_response(respcmd, resp, priv); 867 ret = handle_cmd_response(priv, 0, resp);
867 868
868 spin_lock_irqsave(&priv->driver_lock, flags); 869 spin_lock_irqsave(&priv->driver_lock, flags);
869 870