On Thu, 2018-11-01 at 16:45 +0000, [email protected] wrote:
> From: Ajay Singh <[email protected]>
>
> Use shorter name for 'network_info' variable to avoid line over 80 chars
> issue.
I suppose this is OK, though perhaps unnecessary.
As well, perhaps there are defects in the original code
in a couple places.
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c
> b/drivers/staging/wilc1000/coreconfigurator.c
[]
> - network_info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp);
> - network_info->tsf_lo = (u32)network_info->tsf_hi;
Perhaps there is a defect for both tsf_hi assignments
as it appears as if both are missing ">> 32"
> + info->cap_info = le16_to_cpu(mgt->u.beacon.capab_info);
> + info->beacon_period = le16_to_cpu(mgt->u.beacon.beacon_int);
> + info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp);
> + info->tsf_lo = (u32)info->tsf_hi;
Perhaps this should be
network_info->tsf_hi = le64_to_cpu(mgt->u.beacon.timestamp) >>
32;
or
network_info->tsf_hi = upper_32_bits(le64_to_cpu(...));
network_info->tsf_lo = lower_32_bits(le64_to_cpu(...));
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel