[PATCH] Staging: logical/bit and confusion

From: Roel Kluin
Date: Sat Jan 17 2009 - 08:45:42 EST


fix logical/bit and confusion

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
Is this what was intended?

// vi drivers/staging/otus/80211core/struct.h +598
#define ExtHtCap_ExtChannelOffsetAbove 0x01

// vi drivers/staging/otus/80211core/struct.h +600
#define ExtHtCap_RecomTxWidthSet 0x04

// vi drivers/staging/otus/80211core/struct.h +525
#define HTCAP_SupChannelWidthSet 0x0002

diff --git a/drivers/staging/otus/80211core/cwm.c b/drivers/staging/otus/80211core/cwm.c
index 80f1141..1bd0b1f 100644
--- a/drivers/staging/otus/80211core/cwm.c
+++ b/drivers/staging/otus/80211core/cwm.c
@@ -75,9 +75,9 @@ void zfCoreCwmBusy(zdev_t* dev, u16_t busy)

if((wd->wlanMode == ZM_MODE_INFRASTRUCTURE || wd->wlanMode == ZM_MODE_PSEUDO ||
wd->wlanMode == ZM_MODE_IBSS)) {
- if (wd->sta.ie.HtCap.HtCapInfo && HTCAP_SupChannelWidthSet != 0 &&
- wd->sta.ie.HtInfo.ChannelInfo && ExtHtCap_RecomTxWidthSet != 0 &&
- (wd->sta.ie.HtInfo.ChannelInfo && ExtHtCap_ExtChannelOffsetAbove) == 1) {
+ if ((wd->sta.ie.HtCap.HtCapInfo & HTCAP_SupChannelWidthSet) &&
+ (wd->sta.ie.HtInfo.ChannelInfo & ExtHtCap_RecomTxWidthSet) &&
+ (wd->sta.ie.HtInfo.ChannelInfo & ExtHtCap_ExtChannelOffsetAbove)) {

wd->cwm.cw_width = CWM_WIDTH40;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/