Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec62bd91 authored by Daniel Drake's avatar Daniel Drake Committed by John W. Linville
Browse files

[PATCH] zd1211rw: Support AL7230B RF



This patch adds support for another Airoha RF which is present in some
ZD1211 adapters. This RF supports 802.11a as well as 802.11b/g, but 802.11a
connectivity is not yet supported by this driver.

Signed-off-by: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 20fe2176
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,7 @@ obj-$(CONFIG_ZD1211RW) += zd1211rw.o
zd1211rw-objs := zd_chip.o zd_ieee80211.o \
zd1211rw-objs := zd_chip.o zd_ieee80211.o \
		zd_mac.o zd_netdev.o \
		zd_mac.o zd_netdev.o \
		zd_rf_al2230.o zd_rf_rf2959.o \
		zd_rf_al2230.o zd_rf_rf2959.o \
		zd_rf_al7230b.o \
		zd_rf.o zd_usb.o zd_util.o
		zd_rf.o zd_usb.o zd_util.o


ifeq ($(CONFIG_ZD1211RW_DEBUG),y)
ifeq ($(CONFIG_ZD1211RW_DEBUG),y)
+1 −1
Original line number Original line Diff line number Diff line
@@ -1624,7 +1624,7 @@ int zd_rfwritev_locked(struct zd_chip *chip,
 * We can optionally program the RF directly through CR regs, if supported by
 * We can optionally program the RF directly through CR regs, if supported by
 * the hardware. This is much faster than the older method.
 * the hardware. This is much faster than the older method.
 */
 */
static int zd_rfwrite_cr_locked(struct zd_chip *chip, u32 value)
int zd_rfwrite_cr_locked(struct zd_chip *chip, u32 value)
{
{
	struct zd_ioreq16 ioreqs[] = {
	struct zd_ioreq16 ioreqs[] = {
		{ CR244, (value >> 16) & 0xff },
		{ CR244, (value >> 16) & 0xff },
+2 −0
Original line number Original line Diff line number Diff line
@@ -747,6 +747,8 @@ static inline int zd_rfwrite_locked(struct zd_chip *chip, u32 value, u8 bits)
	return zd_usb_rfwrite(&chip->usb, value, bits);
	return zd_usb_rfwrite(&chip->usb, value, bits);
}
}


int zd_rfwrite_cr_locked(struct zd_chip *chip, u32 value);

int zd_rfwritev_locked(struct zd_chip *chip,
int zd_rfwritev_locked(struct zd_chip *chip,
	               const u32* values, unsigned int count, u8 bits);
	               const u32* values, unsigned int count, u8 bits);
int zd_rfwritev_cr_locked(struct zd_chip *chip,
int zd_rfwritev_cr_locked(struct zd_chip *chip,
+5 −0
Original line number Original line Diff line number Diff line
@@ -76,6 +76,11 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type)
		if (r)
		if (r)
			return r;
			return r;
		break;
		break;
	case AL7230B_RF:
		r = zd_rf_init_al7230b(rf);
		if (r)
			return r;
		break;
	default:
	default:
		dev_err(zd_chip_dev(chip),
		dev_err(zd_chip_dev(chip),
			"RF %s %#x is not supported\n", zd_rf_name(type), type);
			"RF %s %#x is not supported\n", zd_rf_name(type), type);
+1 −0
Original line number Original line Diff line number Diff line
@@ -78,5 +78,6 @@ int zd_switch_radio_off(struct zd_rf *rf);


int zd_rf_init_rf2959(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_al2230(struct zd_rf *rf);
int zd_rf_init_al7230b(struct zd_rf *rf);


#endif /* _ZD_RF_H */
#endif /* _ZD_RF_H */
Loading