Commit ccc915e7 authored by Srinivasan Raju's avatar Srinivasan Raju Committed by Kalle Valo

plfxlc: fix le16_to_cpu warning for beacon_interval

Fix the following sparse warnings:
drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: expected unsigned short [usertype] beacon_interval
drivers/net/wireless/purelifi/plfxlc/chip.c:36:31: sparse: got restricted __le16 [usertype]
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarSrinivasan Raju <srini.raju@purelifi.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220502150133.6052-1-srini.raju@purelifi.com
parent 0d3b26c4
...@@ -29,11 +29,10 @@ int plfxlc_set_beacon_interval(struct plfxlc_chip *chip, u16 interval, ...@@ -29,11 +29,10 @@ int plfxlc_set_beacon_interval(struct plfxlc_chip *chip, u16 interval,
u8 dtim_period, int type) u8 dtim_period, int type)
{ {
if (!interval || if (!interval ||
(chip->beacon_set && (chip->beacon_set && chip->beacon_interval == interval))
le16_to_cpu(chip->beacon_interval) == interval))
return 0; return 0;
chip->beacon_interval = cpu_to_le16(interval); chip->beacon_interval = interval;
chip->beacon_set = true; chip->beacon_set = true;
return plfxlc_usb_wreq(chip->usb.ez_usb, return plfxlc_usb_wreq(chip->usb.ez_usb,
&chip->beacon_interval, &chip->beacon_interval,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment