libertas: switch lbs_cmd() to take a callback function pointer

Holger Schurig hs4233 at mail.mn-solutions.de
Mon Dec 10 03:44:24 EST 2007


I see that you killed pdata_size complete and have now 
changed "struct cmd_ctrl_node" to mostly use the callback. 
Unfortunately, I don't see much code that uses this.

I once grepped for all lbs_prepare_and_send() calls and to all 
calls that uses CMD_OPT_WAITFORRSP. The numbers are now 68 to 
55. So most callers wait for a response (and, as I assume, they 
immediately use either the response or at least the error/status 
code).

For example, in main.c lbs_setup_firmware() there is a call

    ret = lbs_prepare_and_send_command(priv, CMD_GET_HW_SPEC,
         0, CMD_OPTION_WAITFORRSP, 0, NULL);

I can't really see how this should be converted used with a 
purely-callback-based-lbs_cmd().



More information about the libertas-dev mailing list