diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2019-11-05 09:51:22 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-05 18:08:52 +0100 |
commit | 5e3bafbd14b553e30234d234cb6d1fa004e292ab (patch) | |
tree | 2cb0a55046438f1a113d3feeeb79db3434c0bcfc | |
parent | 8888ed03237d07d8a325cf0b8e9f5473796c02f2 (diff) |
staging: wilc1000: avoid 'bool' datatype in struct sent to firmware
Use 'u8' instead of 'bool' datatype for struct element sent to firmware
because storage of bool datatype is not guaranteed.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20191105095058.24223-2-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/wilc1000/wilc_hif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c index e0a95c5cc0d5..59eb7600619b 100644 --- a/drivers/staging/wilc1000/wilc_hif.c +++ b/drivers/staging/wilc1000/wilc_hif.c @@ -32,7 +32,7 @@ struct wilc_op_mode { }; struct wilc_reg_frame { - bool reg; + u8 reg; u8 reg_id; __le16 frame_type; } __packed; @@ -1784,7 +1784,9 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg) wid.val = (u8 *)®_frame; memset(®_frame, 0x0, sizeof(reg_frame)); - reg_frame.reg = reg; + + if (reg) + reg_frame.reg = 1; switch (frame_type) { case IEEE80211_STYPE_ACTION: |