diff options
author | Ajay Singh | 2018-12-02 19:02:19 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-12-05 09:48:45 +0100 |
commit | 21728f2e7226aa1cb8aa04bb670df94afe625196 (patch) | |
tree | 2a37ab17e9460706977cd4518b88f080249f3306 /drivers/staging/wilc1000 | |
parent | staging: wilc1000: remove unnecessary checks in wilc_mac_close() (diff) | |
download | kernel-qcow2-linux-21728f2e7226aa1cb8aa04bb670df94afe625196.tar.gz kernel-qcow2-linux-21728f2e7226aa1cb8aa04bb670df94afe625196.tar.xz kernel-qcow2-linux-21728f2e7226aa1cb8aa04bb670df94afe625196.zip |
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: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/host_interface.c | 10 | ||||
-rw-r--r-- | drivers/staging/wilc1000/host_interface.h | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3f3b013db740..e179a8e5814c 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -289,14 +289,8 @@ static void handle_set_wfi_drv_handler(struct work_struct *work) goto free_msg; currbyte = buffer; - *currbyte = hif_drv->driver_handler_id & DRV_HANDLER_MASK; - currbyte++; - *currbyte = (u32)0 & DRV_HANDLER_MASK; - currbyte++; - *currbyte = (u32)0 & DRV_HANDLER_MASK; - currbyte++; - *currbyte = (u32)0 & DRV_HANDLER_MASK; - currbyte++; + put_unaligned_le32(hif_drv->driver_handler_id, currbyte); + currbyte += 4; *currbyte = (hif_drv_handler->name | (hif_drv_handler->mode << 1)); wid.id = WID_SET_DRV_HANDLER; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 827934522d99..7a71cb6ac214 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -41,7 +41,6 @@ enum { #define WILC_ADD_STA_LENGTH 40 #define WILC_NUM_CONCURRENT_IFC 2 #define WILC_DRV_HANDLER_SIZE 5 -#define DRV_HANDLER_MASK 0x000000FF #define NUM_RSSI 5 |