diff options
author | Daniel Drake <dsd@gentoo.org> | 2007-05-24 01:07:15 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:37 -0400 |
commit | aaf83d4fc4a596929306c894d341e17fbdfba758 (patch) | |
tree | cf54c8bcc0d8be6b895e754f6cff6f9681b759ee /drivers/net/wireless/zd1211rw/zd_rf.h | |
parent | 4481d6093e62e168ab06e9bbb4e67a9bebb8c7f7 (diff) |
[PATCH] zd1211rw: Make CCK gain patching conditional on RF type
The vendor driver code suggests that CR47 patching happens on every channel
change for every RF (depending on bit 8 in POD).
Due to a bug in their driver (upper bits of RF_Mode get zeroed out, then
are examined for 1s when setting some other flags), this isn't actually
what happens, and their generic CCK patching routine never takes effect.
Some of their RF configurations do include explicit (duplicated) code
for CR47 patching though. This patch makes zd1211rw match that
behaviour.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_rf.h')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.h b/drivers/net/wireless/zd1211rw/zd_rf.h index 6dced2ae5a1..c6dfd8227f6 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.h +++ b/drivers/net/wireless/zd1211rw/zd_rf.h @@ -52,6 +52,12 @@ struct zd_rf { * defaults to 1 (yes) */ u8 update_channel_int:1; + /* whether CR47 should be patched from the EEPROM, if the appropriate + * flag is set in the POD. The vendor driver suggests that this should + * be done for all RF's, but a bug in their code prevents but their + * HW_OverWritePhyRegFromE2P() routine from ever taking effect. */ + u8 patch_cck_gain:1; + /* private RF driver data */ void *priv; @@ -84,6 +90,14 @@ static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf) return rf->update_channel_int; } +static inline int zd_rf_should_patch_cck_gain(struct zd_rf *rf) +{ + return rf->patch_cck_gain; +} + +int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel); +int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel); + /* Functions for individual RF chips */ int zd_rf_init_rf2959(struct zd_rf *rf); |