Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58343
b: refs/heads/master
c: 9c8fc71
h: refs/heads/master
i:
  58341: f6bb15e
  58339: 2600d1f
  58335: f5a0524
v: v3
  • Loading branch information
Daniel Drake authored and Jeff Garzik committed Jul 9, 2007
1 parent d8c4fd2 commit ce1381d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9eea9ae6e82d1b0f453c24103a84ce7af5d1e15
refs/heads/master: 9c8fc71ddd1b42c0c632036333790f230cea815d
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,9 @@ static int update_channel_integration_and_calibration(struct zd_chip *chip,
{
int r;

if (!zd_rf_should_update_pwr_int(&chip->rf))
return 0;

r = update_pwr_int(chip, channel);
if (r)
return r;
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@ const char *zd_rf_name(u8 type)
void zd_rf_init(struct zd_rf *rf)
{
memset(rf, 0, sizeof(*rf));

/* default to update channel integration, as almost all RF's do want
* this */
rf->update_channel_int = 1;
}

void zd_rf_clear(struct zd_rf *rf)
{
if (rf->clear)
rf->clear(rf);
ZD_MEMCLEAR(rf, sizeof(*rf));
}

Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/zd1211rw/zd_rf.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ struct zd_rf {

u8 channel;

/* whether channel integration and calibration should be updated
* defaults to 1 (yes) */
u8 update_channel_int:1;

/* private RF driver data */
void *priv;

/* RF-specific functions */
int (*init_hw)(struct zd_rf *rf);
int (*set_channel)(struct zd_rf *rf, u8 channel);
int (*switch_radio_on)(struct zd_rf *rf);
int (*switch_radio_off)(struct zd_rf *rf);
int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel);
void (*clear)(struct zd_rf *rf);
};

const char *zd_rf_name(u8 type);
Expand All @@ -71,6 +79,11 @@ int zd_switch_radio_off(struct zd_rf *rf);
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);

static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf)
{
return rf->update_channel_int;
}

/* Functions for individual RF chips */

int zd_rf_init_rf2959(struct zd_rf *rf);
Expand Down

0 comments on commit ce1381d

Please sign in to comment.