• Home
  • Raw
  • Download

Lines Matching refs:r

109 	int r;  in zd_ioread32v_locked()  local
130 r = zd_ioread16v_locked(chip, v16, a16, count16); in zd_ioread32v_locked()
131 if (r) { in zd_ioread32v_locked()
133 "error: zd_ioread16v_locked. Error number %d\n", r); in zd_ioread32v_locked()
134 return r; in zd_ioread32v_locked()
149 int i, j, r; in _zd_iowrite32v_async_locked() local
174 r = zd_usb_iowrite16v_async(&chip->usb, ioreqs16, count16); in _zd_iowrite32v_async_locked()
176 if (r) { in _zd_iowrite32v_async_locked()
178 "error %d in zd_usb_write16v\n", r); in _zd_iowrite32v_async_locked()
181 return r; in _zd_iowrite32v_async_locked()
187 int r; in _zd_iowrite32v_locked() local
190 r = _zd_iowrite32v_async_locked(chip, ioreqs, count); in _zd_iowrite32v_locked()
191 if (r) { in _zd_iowrite32v_locked()
193 return r; in _zd_iowrite32v_locked()
201 int r; in zd_iowrite16a_locked() local
219 r = zd_usb_iowrite16v_async(&chip->usb, &ioreqs[i], j); in zd_iowrite16a_locked()
220 if (r) { in zd_iowrite16a_locked()
224 r); in zd_iowrite16a_locked()
225 return r; in zd_iowrite16a_locked()
239 int r; in zd_iowrite32a_locked() local
256 r = _zd_iowrite32v_async_locked(chip, &ioreqs[i], j); in zd_iowrite32a_locked()
257 if (r) { in zd_iowrite32a_locked()
261 " Error number %d\n", r); in zd_iowrite32a_locked()
262 return r; in zd_iowrite32a_locked()
271 int r; in zd_ioread16() local
274 r = zd_ioread16_locked(chip, value, addr); in zd_ioread16()
276 return r; in zd_ioread16()
281 int r; in zd_ioread32() local
284 r = zd_ioread32_locked(chip, value, addr); in zd_ioread32()
286 return r; in zd_ioread32()
291 int r; in zd_iowrite16() local
294 r = zd_iowrite16_locked(chip, value, addr); in zd_iowrite16()
296 return r; in zd_iowrite16()
301 int r; in zd_iowrite32() local
304 r = zd_iowrite32_locked(chip, value, addr); in zd_iowrite32()
306 return r; in zd_iowrite32()
312 int r; in zd_ioread32v() local
315 r = zd_ioread32v_locked(chip, values, addresses, count); in zd_ioread32v()
317 return r; in zd_ioread32v()
323 int r; in zd_iowrite32a() local
326 r = zd_iowrite32a_locked(chip, ioreqs, count); in zd_iowrite32a()
328 return r; in zd_iowrite32a()
333 int r; in read_pod() local
337 r = zd_ioread32_locked(chip, &value, E2P_POD); in read_pod()
338 if (r) in read_pod()
374 return r; in read_pod()
381 int r; in zd_write_mac_addr_common() local
397 r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs)); in zd_write_mac_addr_common()
399 return r; in zd_write_mac_addr_common()
427 int r; in zd_read_regdomain() local
431 r = zd_ioread32_locked(chip, &value, E2P_SUBID); in zd_read_regdomain()
433 if (r) in zd_read_regdomain()
434 return r; in zd_read_regdomain()
445 int r; in read_values() local
451 r = zd_ioread32_locked(chip, &v, in read_values()
453 if (r) in read_values()
454 return r; in read_values()
485 int r; in read_ofdm_cal_values() local
494 r = read_values(chip, chip->ofdm_cal_values[i], in read_ofdm_cal_values()
496 if (r) in read_ofdm_cal_values()
497 return r; in read_ofdm_cal_values()
504 int r; in read_cal_int_tables() local
506 r = read_pwr_cal_values(chip); in read_cal_int_tables()
507 if (r) in read_cal_int_tables()
508 return r; in read_cal_int_tables()
509 r = read_pwr_int_values(chip); in read_cal_int_tables()
510 if (r) in read_cal_int_tables()
511 return r; in read_cal_int_tables()
512 r = read_ofdm_cal_values(chip); in read_cal_int_tables()
513 if (r) in read_cal_int_tables()
514 return r; in read_cal_int_tables()
521 int r; in zd_chip_lock_phy_regs() local
525 r = zd_ioread32_locked(chip, &tmp, CR_REG1); in zd_chip_lock_phy_regs()
526 if (r) { in zd_chip_lock_phy_regs()
527 dev_err(zd_chip_dev(chip), "error ioread32(CR_REG1): %d\n", r); in zd_chip_lock_phy_regs()
528 return r; in zd_chip_lock_phy_regs()
533 r = zd_iowrite32_locked(chip, tmp, CR_REG1); in zd_chip_lock_phy_regs()
534 if (r) in zd_chip_lock_phy_regs()
535 dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); in zd_chip_lock_phy_regs()
536 return r; in zd_chip_lock_phy_regs()
541 int r; in zd_chip_unlock_phy_regs() local
545 r = zd_ioread32_locked(chip, &tmp, CR_REG1); in zd_chip_unlock_phy_regs()
546 if (r) { in zd_chip_unlock_phy_regs()
548 "error ioread32(CR_REG1): %d\n", r); in zd_chip_unlock_phy_regs()
549 return r; in zd_chip_unlock_phy_regs()
554 r = zd_iowrite32_locked(chip, tmp, CR_REG1); in zd_chip_unlock_phy_regs()
555 if (r) in zd_chip_unlock_phy_regs()
556 dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); in zd_chip_unlock_phy_regs()
557 return r; in zd_chip_unlock_phy_regs()
563 int r; in patch_cr157() local
569 r = zd_ioread16_locked(chip, &value, E2P_PHY_REG); in patch_cr157()
570 if (r) in patch_cr157()
571 return r; in patch_cr157()
676 int r, t; in zd1211_hw_reset_phy() local
680 r = zd_chip_lock_phy_regs(chip); in zd1211_hw_reset_phy()
681 if (r) in zd1211_hw_reset_phy()
684 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd1211_hw_reset_phy()
685 if (r) in zd1211_hw_reset_phy()
688 r = patch_cr157(chip); in zd1211_hw_reset_phy()
691 if (t && !r) in zd1211_hw_reset_phy()
692 r = t; in zd1211_hw_reset_phy()
694 return r; in zd1211_hw_reset_phy()
758 int r, t; in zd1211b_hw_reset_phy() local
762 r = zd_chip_lock_phy_regs(chip); in zd1211b_hw_reset_phy()
763 if (r) in zd1211b_hw_reset_phy()
766 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd1211b_hw_reset_phy()
768 if (t && !r) in zd1211b_hw_reset_phy()
769 r = t; in zd1211b_hw_reset_phy()
771 return r; in zd1211b_hw_reset_phy()
813 int r; in hw_init_hmac() local
838 r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in hw_init_hmac()
839 if (r) in hw_init_hmac()
840 return r; in hw_init_hmac()
854 int r; in get_aw_pt_bi() local
859 r = zd_ioread32v_locked(chip, values, (const zd_addr_t *)aw_pt_bi_addr, in get_aw_pt_bi()
861 if (r) { in get_aw_pt_bi()
863 return r; in get_aw_pt_bi()
898 int r; in set_beacon_interval() local
924 r = zd_iowrite32_locked(chip, b_interval, CR_BCN_INTERVAL); in set_beacon_interval()
925 if (r) in set_beacon_interval()
926 return r; in set_beacon_interval()
927 r = get_aw_pt_bi(chip, &s); in set_beacon_interval()
928 if (r) in set_beacon_interval()
929 return r; in set_beacon_interval()
936 int r; in zd_set_beacon_interval() local
939 r = set_beacon_interval(chip, interval, dtim_period, type); in zd_set_beacon_interval()
941 return r; in zd_set_beacon_interval()
946 int r; in hw_init() local
950 r = hw_reset_phy(chip); in hw_init()
951 if (r) in hw_init()
952 return r; in hw_init()
954 r = hw_init_hmac(chip); in hw_init()
955 if (r) in hw_init()
956 return r; in hw_init()
970 int r; in dump_cr() local
973 r = zd_ioread32_locked(chip, &value, addr); in dump_cr()
974 if (r) { in dump_cr()
976 "error reading %s. Error number %d\n", addr_string, r); in dump_cr()
977 return r; in dump_cr()
987 int r; in test_init() local
989 r = dump_cr(chip, CR_AFTER_PNP, "CR_AFTER_PNP"); in test_init()
990 if (r) in test_init()
991 return r; in test_init()
992 r = dump_cr(chip, CR_GPI_EN, "CR_GPI_EN"); in test_init()
993 if (r) in test_init()
994 return r; in test_init()
1007 int r; in dump_fw_registers() local
1010 r = zd_ioread16v_locked(chip, values, (const zd_addr_t*)addr, in dump_fw_registers()
1012 if (r) { in dump_fw_registers()
1014 r); in dump_fw_registers()
1028 int r; in print_fw_version() local
1031 r = zd_ioread16_locked(chip, &version, in print_fw_version()
1033 if (r) in print_fw_version()
1034 return r; in print_fw_version()
1081 int r; in zd_chip_enable_hwint() local
1084 r = zd_iowrite32_locked(chip, HWINT_ENABLED, CR_INTERRUPT); in zd_chip_enable_hwint()
1086 return r; in zd_chip_enable_hwint()
1096 int r; in zd_chip_disable_hwint() local
1099 r = disable_hwint(chip); in zd_chip_disable_hwint()
1101 return r; in zd_chip_disable_hwint()
1106 int r; in read_fw_regs_offset() local
1109 r = zd_ioread16_locked(chip, (u16*)&chip->fw_regs_base, in read_fw_regs_offset()
1111 if (r) in read_fw_regs_offset()
1112 return r; in read_fw_regs_offset()
1129 int r; in zd_chip_init_hw() local
1137 r = test_init(chip); in zd_chip_init_hw()
1138 if (r) in zd_chip_init_hw()
1141 r = zd_iowrite32_locked(chip, 1, CR_AFTER_PNP); in zd_chip_init_hw()
1142 if (r) in zd_chip_init_hw()
1145 r = read_fw_regs_offset(chip); in zd_chip_init_hw()
1146 if (r) in zd_chip_init_hw()
1151 r = zd_iowrite32_locked(chip, 0, CR_GPI_EN); in zd_chip_init_hw()
1152 if (r) in zd_chip_init_hw()
1154 r = zd_iowrite32_locked(chip, CWIN_SIZE, CR_CWMIN_CWMAX); in zd_chip_init_hw()
1155 if (r) in zd_chip_init_hw()
1161 r = set_mandatory_rates(chip, 1); in zd_chip_init_hw()
1162 if (r) in zd_chip_init_hw()
1166 r = disable_hwint(chip); in zd_chip_init_hw()
1167 if (r) in zd_chip_init_hw()
1169 r = read_pod(chip, &rf_type); in zd_chip_init_hw()
1170 if (r) in zd_chip_init_hw()
1172 r = hw_init(chip); in zd_chip_init_hw()
1173 if (r) in zd_chip_init_hw()
1175 r = zd_rf_init_hw(&chip->rf, rf_type); in zd_chip_init_hw()
1176 if (r) in zd_chip_init_hw()
1179 r = print_fw_version(chip); in zd_chip_init_hw()
1180 if (r) in zd_chip_init_hw()
1185 r = test_init(chip); in zd_chip_init_hw()
1186 if (r) in zd_chip_init_hw()
1190 r = read_cal_int_tables(chip); in zd_chip_init_hw()
1191 if (r) in zd_chip_init_hw()
1197 return r; in zd_chip_init_hw()
1229 int r; in update_channel_integration_and_calibration() local
1234 r = update_pwr_int(chip, channel); in update_channel_integration_and_calibration()
1235 if (r) in update_channel_integration_and_calibration()
1236 return r; in update_channel_integration_and_calibration()
1244 r = update_ofdm_cal(chip, channel); in update_channel_integration_and_calibration()
1245 if (r) in update_channel_integration_and_calibration()
1246 return r; in update_channel_integration_and_calibration()
1247 r = update_pwr_cal(chip, channel); in update_channel_integration_and_calibration()
1248 if (r) in update_channel_integration_and_calibration()
1249 return r; in update_channel_integration_and_calibration()
1250 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in update_channel_integration_and_calibration()
1251 if (r) in update_channel_integration_and_calibration()
1252 return r; in update_channel_integration_and_calibration()
1261 int r; in patch_cck_gain() local
1268 r = zd_ioread32_locked(chip, &value, E2P_PHY_REG); in patch_cck_gain()
1269 if (r) in patch_cck_gain()
1270 return r; in patch_cck_gain()
1277 int r, t; in zd_chip_set_channel() local
1280 r = zd_chip_lock_phy_regs(chip); in zd_chip_set_channel()
1281 if (r) in zd_chip_set_channel()
1283 r = zd_rf_set_channel(&chip->rf, channel); in zd_chip_set_channel()
1284 if (r) in zd_chip_set_channel()
1286 r = update_channel_integration_and_calibration(chip, channel); in zd_chip_set_channel()
1287 if (r) in zd_chip_set_channel()
1289 r = patch_cck_gain(chip); in zd_chip_set_channel()
1290 if (r) in zd_chip_set_channel()
1292 r = patch_6m_band_edge(chip, channel); in zd_chip_set_channel()
1293 if (r) in zd_chip_set_channel()
1295 r = zd_iowrite32_locked(chip, 0, CR_CONFIG_PHILIPS); in zd_chip_set_channel()
1298 if (t && !r) in zd_chip_set_channel()
1299 r = t; in zd_chip_set_channel()
1302 return r; in zd_chip_set_channel()
1322 int r; in zd_chip_control_leds() local
1331 r = zd_ioread16v_locked(chip, v, (const zd_addr_t *)a, ARRAY_SIZE(a)); in zd_chip_control_leds()
1332 if (r) in zd_chip_control_leds()
1357 r = -EINVAL; in zd_chip_control_leds()
1362 r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); in zd_chip_control_leds()
1363 if (r) in zd_chip_control_leds()
1366 r = 0; in zd_chip_control_leds()
1369 return r; in zd_chip_control_leds()
1374 int r; in zd_chip_set_basic_rates() local
1380 r = zd_iowrite32_locked(chip, cr_rates, CR_BASIC_RATE_TBL); in zd_chip_set_basic_rates()
1382 return r; in zd_chip_set_basic_rates()
1427 int r; in zd_chip_switch_radio_on() local
1430 r = zd_switch_radio_on(&chip->rf); in zd_chip_switch_radio_on()
1432 return r; in zd_chip_switch_radio_on()
1437 int r; in zd_chip_switch_radio_off() local
1440 r = zd_switch_radio_off(&chip->rf); in zd_chip_switch_radio_off()
1442 return r; in zd_chip_switch_radio_off()
1447 int r; in zd_chip_enable_int() local
1450 r = zd_usb_enable_int(&chip->usb); in zd_chip_enable_int()
1452 return r; in zd_chip_enable_int()
1467 int r; in zd_chip_enable_rxtx() local
1471 r = zd_usb_enable_rx(&chip->usb); in zd_chip_enable_rxtx()
1474 return r; in zd_chip_enable_rxtx()
1489 int r; in zd_rfwritev_locked() local
1493 r = zd_rfwrite_locked(chip, values[i], bits); in zd_rfwritev_locked()
1494 if (r) in zd_rfwritev_locked()
1495 return r; in zd_rfwritev_locked()
1519 int r; in zd_rfwritev_cr_locked() local
1523 r = zd_rfwrite_cr_locked(chip, values[i]); in zd_rfwritev_cr_locked()
1524 if (r) in zd_rfwritev_cr_locked()
1525 return r; in zd_rfwritev_cr_locked()
1544 int r; in zd_chip_get_tsf() local
1551 r = zd_ioread32v_locked(chip, values, (const zd_addr_t *)aw_pt_bi_addr, in zd_chip_get_tsf()
1554 if (r) in zd_chip_get_tsf()