diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-04-14 13:41:03 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-16 15:32:22 +0200 |
commit | d7dad550e6ddb96db9d3e4d322f7d1dd8a6a9c8d (patch) | |
tree | 5bcc224ec8f5ef5dc012da0c803b2ddc061a3e31 /kernel/kmod.c | |
parent | iwlwifi: mvm: remove TODO which has been addressed (diff) | |
download | linux-d7dad550e6ddb96db9d3e4d322f7d1dd8a6a9c8d.tar.xz linux-d7dad550e6ddb96db9d3e4d322f7d1dd8a6a9c8d.zip |
iwlwifi: mvm: fix first_antenna
first_antenna is supposed to return the first antenna as a
0-based bitmap: ANT_A is BIT(0), ANT_B is BIT(1), etc...
Since ffs is 1 based (ffs(BIT(0)) = 1), then we had an
off-by-one bug:
BIT(ffs(ANT_A)) = BIT(ffs(BIT(0))) = BIT(1) = ANT_B.
So what we really want is:
BIT(ffs(ANT_A) - 1) = BIT(ffs(BIT(0)) - 1) = BIT(0) = ANT_A.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'kernel/kmod.c')
0 files changed, 0 insertions, 0 deletions