libertas: support boot commands to write persistent firmware and bootloader
Add locking and non-locking versions of if_usb_prog_firmware to support programming firmware after and before driver bring-up respectively. Add more suitable error codes for firmware programming process. Add capability checks for persistent features before attempting to use them. Based on patches from Brajesh Dave and Priyank Singh. Signed-off-by: Brian Cavagnolo <brian@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
38e3b0d86e
commit
1556c0f22d
@ -30,6 +30,7 @@ struct bootcmd
|
||||
|
||||
#define BOOT_CMD_RESP_OK 0x0001
|
||||
#define BOOT_CMD_RESP_FAIL 0x0000
|
||||
#define BOOT_CMD_RESP_NOT_SUPPORTED 0x0002
|
||||
|
||||
struct bootcmdresp
|
||||
{
|
||||
@ -50,6 +51,10 @@ struct if_usb_card {
|
||||
uint8_t ep_in;
|
||||
uint8_t ep_out;
|
||||
|
||||
/* bootcmdresp == 0 means command is pending
|
||||
* bootcmdresp < 0 means error
|
||||
* bootcmdresp > 0 is a BOOT_CMD_RESP_* from firmware
|
||||
*/
|
||||
int8_t bootcmdresp;
|
||||
|
||||
int ep_in_size;
|
||||
|
Reference in New Issue
Block a user