OSDN Git Service

wlcore: simplify/fix/optimize reg_ch_conf_pending operations
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Apr 2019 19:32:50 +0000 (12:32 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 25 Apr 2019 17:12:10 +0000 (20:12 +0300)
commit147b502bda338f4f2dff19faaa5829b691305ea5
tree681bf6b93d7c37d250ba37318a485a737c75f05d
parent324f1feb960c79a07df3acde89a119a5aa80cb10
wlcore: simplify/fix/optimize reg_ch_conf_pending operations

Bitmaps are defined on unsigned longs, so the usage of u32[2] in the
wlcore driver is incorrect.  As noted by Peter Zijlstra, casting arrays
to a bitmap is incorrect for big-endian architectures.

When looking at it I observed that:

- operations on reg_ch_conf_pending is always under the wl_lock mutex,
so set_bit is overkill

- the only case where reg_ch_conf_pending is accessed a u32 at a time is
unnecessary too.

This patch cleans up everything in this area, and changes tmp_ch_bitmap
to have the proper alignment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/cmd.c
drivers/net/wireless/ti/wlcore/wlcore.h