]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB
authorArend van Spriel <arend@broadcom.com>
Mon, 9 May 2011 14:33:27 +0000 (16:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 May 2011 18:12:36 +0000 (11:12 -0700)
commitb8fbc3928cce0c8fa7c01afc33ddef02062504e1
tree80f12b8021d67963732dc3be10a192d463c1e723
parentdc1e961668d148fa5c2784ac51a9a78cb7274cf3
staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB

wlc_phy_compute_dB converts absolute power value to dB implementing
a fixed point calculation for 10*log10(x). It does this by determining
the most significant bit for value x. This can be done using the fls()
bit operation, which has arch specific and possibly more efficient
implementation.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c