aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorUlrich Kunitz <kune@deine-taler.de>2006-09-12 21:41:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-09-25 16:52:17 -0400
commitcbb5e6bbb29a850dcb87d8efa30b457ce8014369 (patch)
tree61ff22dd19cb4a5b6a4ebc0c4e1bd264cb6ba803 /drivers
parent927db87fb1523101653eae44ac27223a30a18ada (diff)
[PATCH] zd1211rw: 16-bit writes for physical control registers
Caused by the fact that physical control registers appear to have only a width of 16 bit, 32-bit writes are not required. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 7c4e32cf0d47..8d3843d74098 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -1181,7 +1181,7 @@ static int update_pwr_int(struct zd_chip *chip, u8 channel)
1181 u8 value = chip->pwr_int_values[channel - 1]; 1181 u8 value = chip->pwr_int_values[channel - 1];
1182 dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_int %#04x\n", 1182 dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_int %#04x\n",
1183 channel, value); 1183 channel, value);
1184 return zd_iowrite32_locked(chip, value, CR31); 1184 return zd_iowrite16_locked(chip, value, CR31);
1185} 1185}
1186 1186
1187static int update_pwr_cal(struct zd_chip *chip, u8 channel) 1187static int update_pwr_cal(struct zd_chip *chip, u8 channel)
@@ -1189,12 +1189,12 @@ static int update_pwr_cal(struct zd_chip *chip, u8 channel)
1189 u8 value = chip->pwr_cal_values[channel-1]; 1189 u8 value = chip->pwr_cal_values[channel-1];
1190 dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_cal %#04x\n", 1190 dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_cal %#04x\n",
1191 channel, value); 1191 channel, value);
1192 return zd_iowrite32_locked(chip, value, CR68); 1192 return zd_iowrite16_locked(chip, value, CR68);
1193} 1193}
1194 1194
1195static int update_ofdm_cal(struct zd_chip *chip, u8 channel) 1195static int update_ofdm_cal(struct zd_chip *chip, u8 channel)
1196{ 1196{
1197 struct zd_ioreq32 ioreqs[3]; 1197 struct zd_ioreq16 ioreqs[3];
1198 1198
1199 ioreqs[0].addr = CR67; 1199 ioreqs[0].addr = CR67;
1200 ioreqs[0].value = chip->ofdm_cal_values[OFDM_36M_INDEX][channel-1]; 1200 ioreqs[0].value = chip->ofdm_cal_values[OFDM_36M_INDEX][channel-1];
@@ -1206,7 +1206,7 @@ static int update_ofdm_cal(struct zd_chip *chip, u8 channel)
1206 dev_dbg_f(zd_chip_dev(chip), 1206 dev_dbg_f(zd_chip_dev(chip),
1207 "channel %d ofdm_cal 36M %#04x 48M %#04x 54M %#04x\n", 1207 "channel %d ofdm_cal 36M %#04x 48M %#04x 54M %#04x\n",
1208 channel, ioreqs[0].value, ioreqs[1].value, ioreqs[2].value); 1208 channel, ioreqs[0].value, ioreqs[1].value, ioreqs[2].value);
1209 return zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); 1209 return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
1210} 1210}
1211 1211
1212static int update_channel_integration_and_calibration(struct zd_chip *chip, 1212static int update_channel_integration_and_calibration(struct zd_chip *chip,
@@ -1218,7 +1218,7 @@ static int update_channel_integration_and_calibration(struct zd_chip *chip,
1218 if (r) 1218 if (r)
1219 return r; 1219 return r;
1220 if (chip->is_zd1211b) { 1220 if (chip->is_zd1211b) {
1221 static const struct zd_ioreq32 ioreqs[] = { 1221 static const struct zd_ioreq16 ioreqs[] = {
1222 { CR69, 0x28 }, 1222 { CR69, 0x28 },
1223 {}, 1223 {},
1224 { CR69, 0x2a }, 1224 { CR69, 0x2a },
@@ -1230,7 +1230,7 @@ static int update_channel_integration_and_calibration(struct zd_chip *chip,
1230 r = update_pwr_cal(chip, channel); 1230 r = update_pwr_cal(chip, channel);
1231 if (r) 1231 if (r)
1232 return r; 1232 return r;
1233 r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); 1233 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
1234 if (r) 1234 if (r)
1235 return r; 1235 return r;
1236 } 1236 }
@@ -1252,7 +1252,7 @@ static int patch_cck_gain(struct zd_chip *chip)
1252 if (r) 1252 if (r)
1253 return r; 1253 return r;
1254 dev_dbg_f(zd_chip_dev(chip), "patching value %x\n", value & 0xff); 1254 dev_dbg_f(zd_chip_dev(chip), "patching value %x\n", value & 0xff);
1255 return zd_iowrite32_locked(chip, value & 0xff, CR47); 1255 return zd_iowrite16_locked(chip, value & 0xff, CR47);
1256} 1256}
1257 1257
1258int zd_chip_set_channel(struct zd_chip *chip, u8 channel) 1258int zd_chip_set_channel(struct zd_chip *chip, u8 channel)