Lines Matching full:r
95 int r; in zd_ioread32v_locked() local
116 r = zd_ioread16v_locked(chip, v16, a16, count16); in zd_ioread32v_locked()
117 if (r) { in zd_ioread32v_locked()
119 "error: %s. Error number %d\n", __func__, r); in zd_ioread32v_locked()
120 return r; in zd_ioread32v_locked()
135 int i, j, r; in _zd_iowrite32v_async_locked() local
160 r = zd_usb_iowrite16v_async(&chip->usb, ioreqs16, count16); in _zd_iowrite32v_async_locked()
162 if (r) { in _zd_iowrite32v_async_locked()
164 "error %d in zd_usb_write16v\n", r); in _zd_iowrite32v_async_locked()
167 return r; in _zd_iowrite32v_async_locked()
173 int r; in _zd_iowrite32v_locked() local
176 r = _zd_iowrite32v_async_locked(chip, ioreqs, count); in _zd_iowrite32v_locked()
177 if (r) { in _zd_iowrite32v_locked()
179 return r; in _zd_iowrite32v_locked()
187 int r; in zd_iowrite16a_locked() local
205 r = zd_usb_iowrite16v_async(&chip->usb, &ioreqs[i], j); in zd_iowrite16a_locked()
206 if (r) { in zd_iowrite16a_locked()
210 r); in zd_iowrite16a_locked()
211 return r; in zd_iowrite16a_locked()
225 int r; in zd_iowrite32a_locked() local
242 r = _zd_iowrite32v_async_locked(chip, &ioreqs[i], j); in zd_iowrite32a_locked()
243 if (r) { in zd_iowrite32a_locked()
247 r); in zd_iowrite32a_locked()
248 return r; in zd_iowrite32a_locked()
257 int r; in zd_ioread16() local
260 r = zd_ioread16_locked(chip, value, addr); in zd_ioread16()
262 return r; in zd_ioread16()
267 int r; in zd_ioread32() local
270 r = zd_ioread32_locked(chip, value, addr); in zd_ioread32()
272 return r; in zd_ioread32()
277 int r; in zd_iowrite16() local
280 r = zd_iowrite16_locked(chip, value, addr); in zd_iowrite16()
282 return r; in zd_iowrite16()
287 int r; in zd_iowrite32() local
290 r = zd_iowrite32_locked(chip, value, addr); in zd_iowrite32()
292 return r; in zd_iowrite32()
298 int r; in zd_ioread32v() local
301 r = zd_ioread32v_locked(chip, values, addresses, count); in zd_ioread32v()
303 return r; in zd_ioread32v()
309 int r; in zd_iowrite32a() local
312 r = zd_iowrite32a_locked(chip, ioreqs, count); in zd_iowrite32a()
314 return r; in zd_iowrite32a()
319 int r; in read_pod() local
323 r = zd_ioread32_locked(chip, &value, E2P_POD); in read_pod()
324 if (r) in read_pod()
360 return r; in read_pod()
367 int r; in zd_write_mac_addr_common() local
383 r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs)); in zd_write_mac_addr_common()
385 return r; in zd_write_mac_addr_common()
413 int r; in zd_read_regdomain() local
417 r = zd_ioread32_locked(chip, &value, E2P_SUBID); in zd_read_regdomain()
419 if (r) in zd_read_regdomain()
420 return r; in zd_read_regdomain()
431 int r; in read_values() local
437 r = zd_ioread32_locked(chip, &v, in read_values()
439 if (r) in read_values()
440 return r; in read_values()
471 int r; in read_ofdm_cal_values() local
480 r = read_values(chip, chip->ofdm_cal_values[i], in read_ofdm_cal_values()
482 if (r) in read_ofdm_cal_values()
483 return r; in read_ofdm_cal_values()
490 int r; in read_cal_int_tables() local
492 r = read_pwr_cal_values(chip); in read_cal_int_tables()
493 if (r) in read_cal_int_tables()
494 return r; in read_cal_int_tables()
495 r = read_pwr_int_values(chip); in read_cal_int_tables()
496 if (r) in read_cal_int_tables()
497 return r; in read_cal_int_tables()
498 r = read_ofdm_cal_values(chip); in read_cal_int_tables()
499 if (r) in read_cal_int_tables()
500 return r; in read_cal_int_tables()
507 int r; in zd_chip_lock_phy_regs() local
511 r = zd_ioread32_locked(chip, &tmp, CR_REG1); in zd_chip_lock_phy_regs()
512 if (r) { in zd_chip_lock_phy_regs()
513 dev_err(zd_chip_dev(chip), "error ioread32(CR_REG1): %d\n", r); in zd_chip_lock_phy_regs()
514 return r; in zd_chip_lock_phy_regs()
519 r = zd_iowrite32_locked(chip, tmp, CR_REG1); in zd_chip_lock_phy_regs()
520 if (r) in zd_chip_lock_phy_regs()
521 dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); in zd_chip_lock_phy_regs()
522 return r; in zd_chip_lock_phy_regs()
527 int r; in zd_chip_unlock_phy_regs() local
531 r = zd_ioread32_locked(chip, &tmp, CR_REG1); in zd_chip_unlock_phy_regs()
532 if (r) { in zd_chip_unlock_phy_regs()
534 "error ioread32(CR_REG1): %d\n", r); in zd_chip_unlock_phy_regs()
535 return r; in zd_chip_unlock_phy_regs()
540 r = zd_iowrite32_locked(chip, tmp, CR_REG1); in zd_chip_unlock_phy_regs()
541 if (r) in zd_chip_unlock_phy_regs()
542 dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); in zd_chip_unlock_phy_regs()
543 return r; in zd_chip_unlock_phy_regs()
549 int r; in patch_cr157() local
555 r = zd_ioread16_locked(chip, &value, E2P_PHY_REG); in patch_cr157()
556 if (r) in patch_cr157()
557 return r; in patch_cr157()
662 int r, t; in zd1211_hw_reset_phy() local
666 r = zd_chip_lock_phy_regs(chip); in zd1211_hw_reset_phy()
667 if (r) in zd1211_hw_reset_phy()
670 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd1211_hw_reset_phy()
671 if (r) in zd1211_hw_reset_phy()
674 r = patch_cr157(chip); in zd1211_hw_reset_phy()
677 if (t && !r) in zd1211_hw_reset_phy()
678 r = t; in zd1211_hw_reset_phy()
680 return r; in zd1211_hw_reset_phy()
744 int r, t; in zd1211b_hw_reset_phy() local
748 r = zd_chip_lock_phy_regs(chip); in zd1211b_hw_reset_phy()
749 if (r) in zd1211b_hw_reset_phy()
752 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd1211b_hw_reset_phy()
754 if (t && !r) in zd1211b_hw_reset_phy()
755 r = t; in zd1211b_hw_reset_phy()
757 return r; in zd1211b_hw_reset_phy()
799 int r; in hw_init_hmac() local
824 r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in hw_init_hmac()
825 if (r) in hw_init_hmac()
826 return r; in hw_init_hmac()
840 int r; in get_aw_pt_bi() local
845 r = zd_ioread32v_locked(chip, values, (const zd_addr_t *)aw_pt_bi_addr, in get_aw_pt_bi()
847 if (r) { in get_aw_pt_bi()
849 return r; in get_aw_pt_bi()
884 int r; in set_beacon_interval() local
910 r = zd_iowrite32_locked(chip, b_interval, CR_BCN_INTERVAL); in set_beacon_interval()
911 if (r) in set_beacon_interval()
912 return r; in set_beacon_interval()
913 r = get_aw_pt_bi(chip, &s); in set_beacon_interval()
914 if (r) in set_beacon_interval()
915 return r; in set_beacon_interval()
922 int r; in zd_set_beacon_interval() local
925 r = set_beacon_interval(chip, interval, dtim_period, type); in zd_set_beacon_interval()
927 return r; in zd_set_beacon_interval()
932 int r; in hw_init() local
936 r = hw_reset_phy(chip); in hw_init()
937 if (r) in hw_init()
938 return r; in hw_init()
940 r = hw_init_hmac(chip); in hw_init()
941 if (r) in hw_init()
942 return r; in hw_init()
956 int r; in dump_cr() local
959 r = zd_ioread32_locked(chip, &value, addr); in dump_cr()
960 if (r) { in dump_cr()
962 "error reading %s. Error number %d\n", addr_string, r); in dump_cr()
963 return r; in dump_cr()
973 int r; in test_init() local
975 r = dump_cr(chip, CR_AFTER_PNP, "CR_AFTER_PNP"); in test_init()
976 if (r) in test_init()
977 return r; in test_init()
978 r = dump_cr(chip, CR_GPI_EN, "CR_GPI_EN"); in test_init()
979 if (r) in test_init()
980 return r; in test_init()
993 int r; in dump_fw_registers() local
996 r = zd_ioread16v_locked(chip, values, (const zd_addr_t*)addr, in dump_fw_registers()
998 if (r) { in dump_fw_registers()
1000 r); in dump_fw_registers()
1014 int r; in print_fw_version() local
1017 r = zd_ioread16_locked(chip, &version, in print_fw_version()
1019 if (r) in print_fw_version()
1020 return r; in print_fw_version()
1067 int r; in zd_chip_enable_hwint() local
1070 r = zd_iowrite32_locked(chip, HWINT_ENABLED, CR_INTERRUPT); in zd_chip_enable_hwint()
1072 return r; in zd_chip_enable_hwint()
1082 int r; in zd_chip_disable_hwint() local
1085 r = disable_hwint(chip); in zd_chip_disable_hwint()
1087 return r; in zd_chip_disable_hwint()
1092 int r; in read_fw_regs_offset() local
1095 r = zd_ioread16_locked(chip, (u16*)&chip->fw_regs_base, in read_fw_regs_offset()
1097 if (r) in read_fw_regs_offset()
1098 return r; in read_fw_regs_offset()
1115 int r; in zd_chip_init_hw() local
1123 r = test_init(chip); in zd_chip_init_hw()
1124 if (r) in zd_chip_init_hw()
1127 r = zd_iowrite32_locked(chip, 1, CR_AFTER_PNP); in zd_chip_init_hw()
1128 if (r) in zd_chip_init_hw()
1131 r = read_fw_regs_offset(chip); in zd_chip_init_hw()
1132 if (r) in zd_chip_init_hw()
1137 r = zd_iowrite32_locked(chip, 0, CR_GPI_EN); in zd_chip_init_hw()
1138 if (r) in zd_chip_init_hw()
1140 r = zd_iowrite32_locked(chip, CWIN_SIZE, CR_CWMIN_CWMAX); in zd_chip_init_hw()
1141 if (r) in zd_chip_init_hw()
1147 r = set_mandatory_rates(chip, 1); in zd_chip_init_hw()
1148 if (r) in zd_chip_init_hw()
1152 r = disable_hwint(chip); in zd_chip_init_hw()
1153 if (r) in zd_chip_init_hw()
1155 r = read_pod(chip, &rf_type); in zd_chip_init_hw()
1156 if (r) in zd_chip_init_hw()
1158 r = hw_init(chip); in zd_chip_init_hw()
1159 if (r) in zd_chip_init_hw()
1161 r = zd_rf_init_hw(&chip->rf, rf_type); in zd_chip_init_hw()
1162 if (r) in zd_chip_init_hw()
1165 r = print_fw_version(chip); in zd_chip_init_hw()
1166 if (r) in zd_chip_init_hw()
1171 r = test_init(chip); in zd_chip_init_hw()
1172 if (r) in zd_chip_init_hw()
1176 r = read_cal_int_tables(chip); in zd_chip_init_hw()
1177 if (r) in zd_chip_init_hw()
1183 return r; in zd_chip_init_hw()
1215 int r; in update_channel_integration_and_calibration() local
1220 r = update_pwr_int(chip, channel); in update_channel_integration_and_calibration()
1221 if (r) in update_channel_integration_and_calibration()
1222 return r; in update_channel_integration_and_calibration()
1230 r = update_ofdm_cal(chip, channel); in update_channel_integration_and_calibration()
1231 if (r) in update_channel_integration_and_calibration()
1232 return r; in update_channel_integration_and_calibration()
1233 r = update_pwr_cal(chip, channel); in update_channel_integration_and_calibration()
1234 if (r) in update_channel_integration_and_calibration()
1235 return r; in update_channel_integration_and_calibration()
1236 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in update_channel_integration_and_calibration()
1237 if (r) in update_channel_integration_and_calibration()
1238 return r; in update_channel_integration_and_calibration()
1247 int r; in patch_cck_gain() local
1254 r = zd_ioread32_locked(chip, &value, E2P_PHY_REG); in patch_cck_gain()
1255 if (r) in patch_cck_gain()
1256 return r; in patch_cck_gain()
1263 int r, t; in zd_chip_set_channel() local
1266 r = zd_chip_lock_phy_regs(chip); in zd_chip_set_channel()
1267 if (r) in zd_chip_set_channel()
1269 r = zd_rf_set_channel(&chip->rf, channel); in zd_chip_set_channel()
1270 if (r) in zd_chip_set_channel()
1272 r = update_channel_integration_and_calibration(chip, channel); in zd_chip_set_channel()
1273 if (r) in zd_chip_set_channel()
1275 r = patch_cck_gain(chip); in zd_chip_set_channel()
1276 if (r) in zd_chip_set_channel()
1278 r = patch_6m_band_edge(chip, channel); in zd_chip_set_channel()
1279 if (r) in zd_chip_set_channel()
1281 r = zd_iowrite32_locked(chip, 0, CR_CONFIG_PHILIPS); in zd_chip_set_channel()
1284 if (t && !r) in zd_chip_set_channel()
1285 r = t; in zd_chip_set_channel()
1288 return r; in zd_chip_set_channel()
1308 int r; in zd_chip_control_leds() local
1317 r = zd_ioread16v_locked(chip, v, (const zd_addr_t *)a, ARRAY_SIZE(a)); in zd_chip_control_leds()
1318 if (r) in zd_chip_control_leds()
1343 r = -EINVAL; in zd_chip_control_leds()
1348 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd_chip_control_leds()
1349 if (r) in zd_chip_control_leds()
1352 r = 0; in zd_chip_control_leds()
1355 return r; in zd_chip_control_leds()
1360 int r; in zd_chip_set_basic_rates() local
1366 r = zd_iowrite32_locked(chip, cr_rates, CR_BASIC_RATE_TBL); in zd_chip_set_basic_rates()
1368 return r; in zd_chip_set_basic_rates()
1413 int r; in zd_chip_switch_radio_on() local
1416 r = zd_switch_radio_on(&chip->rf); in zd_chip_switch_radio_on()
1418 return r; in zd_chip_switch_radio_on()
1423 int r; in zd_chip_switch_radio_off() local
1426 r = zd_switch_radio_off(&chip->rf); in zd_chip_switch_radio_off()
1428 return r; in zd_chip_switch_radio_off()
1433 int r; in zd_chip_enable_int() local
1436 r = zd_usb_enable_int(&chip->usb); in zd_chip_enable_int()
1438 return r; in zd_chip_enable_int()
1453 int r; in zd_chip_enable_rxtx() local
1457 r = zd_usb_enable_rx(&chip->usb); in zd_chip_enable_rxtx()
1460 return r; in zd_chip_enable_rxtx()
1475 int r; in zd_rfwritev_locked() local
1479 r = zd_rfwrite_locked(chip, values[i], bits); in zd_rfwritev_locked()
1480 if (r) in zd_rfwritev_locked()
1481 return r; in zd_rfwritev_locked()
1505 int r; in zd_rfwritev_cr_locked() local
1509 r = zd_rfwrite_cr_locked(chip, values[i]); in zd_rfwritev_cr_locked()
1510 if (r) in zd_rfwritev_cr_locked()
1511 return r; in zd_rfwritev_cr_locked()
1530 int r; in zd_chip_get_tsf() local
1537 r = zd_ioread32v_locked(chip, values, (const zd_addr_t *)aw_pt_bi_addr, in zd_chip_get_tsf()
1540 if (r) in zd_chip_get_tsf()