Commit c01ef29e authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6655: mac80211 conversion: card.c use basic_rates

Use basic_rates to find cck and ofdm rates.

wBasicRate will be removed later.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0614a0e8
...@@ -1457,7 +1457,7 @@ static unsigned short CARDwGetCCKControlRate(struct vnt_private *pDevice, ...@@ -1457,7 +1457,7 @@ static unsigned short CARDwGetCCKControlRate(struct vnt_private *pDevice,
unsigned int ui = (unsigned int) wRateIdx; unsigned int ui = (unsigned int) wRateIdx;
while (ui > RATE_1M) { while (ui > RATE_1M) {
if (pDevice->wBasicRate & ((unsigned short)1 << ui)) if (pDevice->basic_rates & ((u32)0x1 << ui))
return (unsigned short)ui; return (unsigned short)ui;
ui--; ui--;
...@@ -1482,7 +1482,7 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice, ...@@ -1482,7 +1482,7 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice,
{ {
unsigned int ui = (unsigned int) wRateIdx; unsigned int ui = (unsigned int) wRateIdx;
pr_debug("BASIC RATE: %X\n", pDevice->wBasicRate); pr_debug("BASIC RATE: %X\n", pDevice->basic_rates);
if (!CARDbIsOFDMinBasicRate((void *)pDevice)) { if (!CARDbIsOFDMinBasicRate((void *)pDevice)) {
pr_debug("CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx); pr_debug("CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx);
...@@ -1491,7 +1491,7 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice, ...@@ -1491,7 +1491,7 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice,
return wRateIdx; return wRateIdx;
} }
while (ui > RATE_11M) { while (ui > RATE_11M) {
if (pDevice->wBasicRate & ((unsigned short)1 << ui)) { if (pDevice->basic_rates & ((u32)0x1 << ui)) {
pr_debug("CARDwGetOFDMControlRate : %d\n", ui); pr_debug("CARDwGetOFDMControlRate : %d\n", ui);
return (unsigned short)ui; return (unsigned short)ui;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment