diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_rf.h | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 95b4a2a26707..4a2ceb93aaad 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -1253,6 +1253,9 @@ static int update_channel_integration_and_calibration(struct zd_chip *chip, | |||
1253 | { | 1253 | { |
1254 | int r; | 1254 | int r; |
1255 | 1255 | ||
1256 | if (!zd_rf_should_update_pwr_int(&chip->rf)) | ||
1257 | return 0; | ||
1258 | |||
1256 | r = update_pwr_int(chip, channel); | 1259 | r = update_pwr_int(chip, channel); |
1257 | if (r) | 1260 | if (r) |
1258 | return r; | 1261 | return r; |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c index 549c23bcd6cc..c4981ad2f9ea 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.c +++ b/drivers/net/wireless/zd1211rw/zd_rf.c | |||
@@ -52,10 +52,16 @@ const char *zd_rf_name(u8 type) | |||
52 | void zd_rf_init(struct zd_rf *rf) | 52 | void zd_rf_init(struct zd_rf *rf) |
53 | { | 53 | { |
54 | memset(rf, 0, sizeof(*rf)); | 54 | memset(rf, 0, sizeof(*rf)); |
55 | |||
56 | /* default to update channel integration, as almost all RF's do want | ||
57 | * this */ | ||
58 | rf->update_channel_int = 1; | ||
55 | } | 59 | } |
56 | 60 | ||
57 | void zd_rf_clear(struct zd_rf *rf) | 61 | void zd_rf_clear(struct zd_rf *rf) |
58 | { | 62 | { |
63 | if (rf->clear) | ||
64 | rf->clear(rf); | ||
59 | ZD_MEMCLEAR(rf, sizeof(*rf)); | 65 | ZD_MEMCLEAR(rf, sizeof(*rf)); |
60 | } | 66 | } |
61 | 67 | ||
diff --git a/drivers/net/wireless/zd1211rw/zd_rf.h b/drivers/net/wireless/zd1211rw/zd_rf.h index aa9cc105ce60..c204f9ae7128 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf.h +++ b/drivers/net/wireless/zd1211rw/zd_rf.h | |||
@@ -48,12 +48,20 @@ struct zd_rf { | |||
48 | 48 | ||
49 | u8 channel; | 49 | u8 channel; |
50 | 50 | ||
51 | /* whether channel integration and calibration should be updated | ||
52 | * defaults to 1 (yes) */ | ||
53 | u8 update_channel_int:1; | ||
54 | |||
55 | /* private RF driver data */ | ||
56 | void *priv; | ||
57 | |||
51 | /* RF-specific functions */ | 58 | /* RF-specific functions */ |
52 | int (*init_hw)(struct zd_rf *rf); | 59 | int (*init_hw)(struct zd_rf *rf); |
53 | int (*set_channel)(struct zd_rf *rf, u8 channel); | 60 | int (*set_channel)(struct zd_rf *rf, u8 channel); |
54 | int (*switch_radio_on)(struct zd_rf *rf); | 61 | int (*switch_radio_on)(struct zd_rf *rf); |
55 | int (*switch_radio_off)(struct zd_rf *rf); | 62 | int (*switch_radio_off)(struct zd_rf *rf); |
56 | int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel); | 63 | int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel); |
64 | void (*clear)(struct zd_rf *rf); | ||
57 | }; | 65 | }; |
58 | 66 | ||
59 | const char *zd_rf_name(u8 type); | 67 | const char *zd_rf_name(u8 type); |
@@ -71,6 +79,11 @@ int zd_switch_radio_off(struct zd_rf *rf); | |||
71 | int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel); | 79 | int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel); |
72 | int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel); | 80 | int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel); |
73 | 81 | ||
82 | static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf) | ||
83 | { | ||
84 | return rf->update_channel_int; | ||
85 | } | ||
86 | |||
74 | /* Functions for individual RF chips */ | 87 | /* Functions for individual RF chips */ |
75 | 88 | ||
76 | int zd_rf_init_rf2959(struct zd_rf *rf); | 89 | int zd_rf_init_rf2959(struct zd_rf *rf); |