Commit 21728f2e authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: make use of put_unaligned_le32 in handle_set_wfi_drv_handler()



Make use of put_unaligned_le32() function to pack the wid command buffer
for firmware.

Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 440592df
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -289,14 +289,8 @@ static void handle_set_wfi_drv_handler(struct work_struct *work)
		goto free_msg;
		goto free_msg;


	currbyte = buffer;
	currbyte = buffer;
	*currbyte = hif_drv->driver_handler_id & DRV_HANDLER_MASK;
	put_unaligned_le32(hif_drv->driver_handler_id, currbyte);
	currbyte++;
	currbyte += 4;
	*currbyte = (u32)0 & DRV_HANDLER_MASK;
	currbyte++;
	*currbyte = (u32)0 & DRV_HANDLER_MASK;
	currbyte++;
	*currbyte = (u32)0 & DRV_HANDLER_MASK;
	currbyte++;
	*currbyte = (hif_drv_handler->name | (hif_drv_handler->mode << 1));
	*currbyte = (hif_drv_handler->name | (hif_drv_handler->mode << 1));


	wid.id = WID_SET_DRV_HANDLER;
	wid.id = WID_SET_DRV_HANDLER;
+0 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,6 @@ enum {
#define WILC_ADD_STA_LENGTH			40
#define WILC_ADD_STA_LENGTH			40
#define WILC_NUM_CONCURRENT_IFC			2
#define WILC_NUM_CONCURRENT_IFC			2
#define WILC_DRV_HANDLER_SIZE			5
#define WILC_DRV_HANDLER_SIZE			5
#define DRV_HANDLER_MASK			0x000000FF


#define NUM_RSSI                5
#define NUM_RSSI                5