Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58345
b: refs/heads/master
c: aaf83d4
h: refs/heads/master
i:
  58343: ce1381d
v: v3
  • Loading branch information
Daniel Drake authored and Jeff Garzik committed Jul 9, 2007
1 parent f9c129a commit b6078d1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4481d6093e62e168ab06e9bbb4e67a9bebb8c7f7
refs/heads/master: aaf83d4fc4a596929306c894d341e17fbdfba758
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/zd1211rw/zd_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ static int patch_cck_gain(struct zd_chip *chip)
int r;
u32 value;

if (!chip->patch_cck_gain)
if (!chip->patch_cck_gain || !zd_rf_should_patch_cck_gain(&chip->rf))
return 0;

ZD_ASSERT(mutex_is_locked(&chip->mutex));
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_rf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_rf_al2230.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,5 +432,6 @@ int zd_rf_init_al2230(struct zd_rf *rf)
rf->switch_radio_on = zd1211_al2230_switch_radio_on;
}
rf->patch_6m_band_edge = zd_rf_generic_patch_6m;
rf->patch_cck_gain = 1;
return 0;
}
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ int zd_rf_init_al7230b(struct zd_rf *rf)
rf->switch_radio_on = zd1211_al7230b_switch_radio_on;
rf->set_channel = zd1211_al7230b_set_channel;
rf->patch_6m_band_edge = zd_rf_generic_patch_6m;
rf->patch_cck_gain = 1;
}

rf->switch_radio_off = al7230b_switch_radio_off;
Expand Down

0 comments on commit b6078d1

Please sign in to comment.