Skip to content

Commit

Permalink
[PATCH] zd1211rw: Add UW2453 RF support
Browse files Browse the repository at this point in the history
This patch adds support for another radio appearing in new devices: the
Ubec UW2453. It's more complicated than the other RF's we support, but
Ubec publish full tech specs so we're able to understand the vendor code
relatively well.

Now that we support UW2453, we also support Atheros' new USB chip: the
AR5007UG. From the little info we have, this appears to be just a
rebranded ZD1211B.

This RF code doesn't work very well -- lots more TX/RX errors than the
other RFs. However, the vendor driver doesn't do any better, so this is
all we can do for now.

[kune@deine-taler.de: bug fixes]
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Drake authored and Jeff Garzik committed Jul 9, 2007
1 parent 9c8fc71 commit 4481d60
Show file tree
Hide file tree
Showing 5 changed files with 547 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/zd1211rw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ obj-$(CONFIG_ZD1211RW) += zd1211rw.o
zd1211rw-objs := zd_chip.o zd_ieee80211.o \
zd_mac.o zd_netdev.o \
zd_rf_al2230.o zd_rf_rf2959.o \
zd_rf_al7230b.o \
zd_rf_al7230b.o zd_rf_uw2453.o \
zd_rf.o zd_usb.o zd_util.o

ifeq ($(CONFIG_ZD1211RW_DEBUG),y)
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/zd1211rw/zd_chip.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@ enum {
#define CR_ZD1211B_TXOP CTL_REG(0x0b20)
#define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28)

/* Used to detect PLL lock */
#define UW2453_INTR_REG ((zd_addr_t)0x85c1)

#define CWIN_SIZE 0x007f043f


Expand Down
15 changes: 8 additions & 7 deletions drivers/net/wireless/zd1211rw/zd_rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,23 @@ void zd_rf_clear(struct zd_rf *rf)

int zd_rf_init_hw(struct zd_rf *rf, u8 type)
{
int r, t;
int r = 0;
int t;
struct zd_chip *chip = zd_rf_to_chip(rf);

ZD_ASSERT(mutex_is_locked(&chip->mutex));
switch (type) {
case RF2959_RF:
r = zd_rf_init_rf2959(rf);
if (r)
return r;
break;
case AL2230_RF:
r = zd_rf_init_al2230(rf);
if (r)
return r;
break;
case AL7230B_RF:
r = zd_rf_init_al7230b(rf);
if (r)
return r;
break;
case UW2453_RF:
r = zd_rf_init_uw2453(rf);
break;
default:
dev_err(zd_chip_dev(chip),
Expand All @@ -94,6 +92,9 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type)
return -ENODEV;
}

if (r)
return r;

rf->type = type;

r = zd_chip_lock_phy_regs(chip);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/zd1211rw/zd_rf.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf)
int zd_rf_init_rf2959(struct zd_rf *rf);
int zd_rf_init_al2230(struct zd_rf *rf);
int zd_rf_init_al7230b(struct zd_rf *rf);
int zd_rf_init_uw2453(struct zd_rf *rf);

#endif /* _ZD_RF_H */
Loading

0 comments on commit 4481d60

Please sign in to comment.