Lines Matching refs:ret

56 	int ret;
58 ret = request_firmware(&fw, WL1251_FW_NAME, dev);
60 if (ret < 0) {
61 wl1251_error("could not get firmware: %d", ret);
62 return ret;
68 ret = -EILSEQ;
77 ret = -ENOMEM;
83 ret = 0;
88 return ret;
95 int ret;
97 ret = request_firmware(&fw, WL1251_NVS_NAME, dev);
99 if (ret < 0) {
100 wl1251_error("could not get nvs file: %d", ret);
101 return ret;
107 ret = -EILSEQ;
115 ret = -ENOMEM;
121 ret = 0;
126 return ret;
143 int ret;
145 ret = wl1251_power_on(wl);
146 if (ret < 0)
147 return ret;
182 ret = -ENODEV;
187 ret = wl1251_fetch_firmware(wl);
188 if (ret < 0)
193 return ret;
202 int ret;
211 ret = wl1251_ps_elp_wakeup(wl);
212 if (ret < 0)
309 int ret;
311 ret = wl1251_acx_frame_rates(wl, DEFAULT_HW_GEN_TX_RATE,
315 if (ret < 0)
325 ret = wl1251_cmd_join(wl, bss_type, channel, beacon_interval,
327 if (ret < 0)
330 ret = wl1251_event_wait(wl, JOIN_EVENT_COMPLETE_ID, 100);
331 if (ret < 0)
335 return ret;
372 int ret = 0;
381 ret = -EBUSY;
385 ret = wl1251_chip_wakeup(wl);
386 if (ret < 0)
389 ret = wl1251_boot(wl);
390 if (ret < 0)
393 ret = wl1251_hw_init(wl);
394 if (ret < 0)
397 ret = wl1251_acx_station_id(wl);
398 if (ret < 0)
410 if (ret < 0)
415 return ret;
484 int ret = 0;
495 ret = -EBUSY;
509 ret = -EOPNOTSUPP;
516 ret = wl1251_acx_station_id(wl);
517 if (ret < 0)
523 return ret;
543 int ret = -ENOMEM;
556 ret = wl1251_cmd_template_set(wl, CMD_NULL_DATA, ptr, size);
560 if (ret)
561 wl1251_warning("cmd build null data failed: %d", ret);
563 return ret;
596 int channel, ret = 0;
610 ret = wl1251_ps_elp_wakeup(wl);
611 if (ret < 0)
625 ret = wl1251_acx_feature_cfg(wl, mode);
626 if (ret < 0)
642 ret = wl1251_cmd_data_path_rx(wl, wl->channel, 1);
644 ret = wl1251_join(wl, wl->bss_type, wl->channel,
647 if (ret < 0)
658 ret = wl1251_acx_wr_tbtt_and_dtim(wl, wl->beacon_int,
664 ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
665 if (ret < 0)
673 ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE);
674 if (ret < 0)
681 ret = wl1251_ps_set_mode(wl, STATION_IDLE);
682 if (ret < 0)
685 ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE);
686 if (ret < 0)
688 ret = wl1251_join(wl, wl->bss_type, wl->channel,
690 if (ret < 0)
696 ret = wl1251_acx_tx_power(wl, conf->power_level);
697 if (ret < 0)
709 return ret;
763 int ret;
803 ret = wl1251_ps_elp_wakeup(wl);
804 if (ret < 0)
808 ret = wl1251_acx_group_address_tbl(wl, false, NULL, 0);
810 ret = wl1251_acx_group_address_tbl(wl, fp->enabled,
813 if (ret < 0)
874 int ret;
883 ret = -ENOMEM;
897 ret = -EOPNOTSUPP;
906 ret = -EOPNOTSUPP;
919 ret = wl1251_ps_elp_wakeup(wl);
920 if (ret < 0)
923 ret = wl1251_set_key_type(wl, wl_cmd, cmd, key, addr);
924 if (ret < 0) {
954 ret = wl1251_cmd_send(wl, CMD_SET_KEYS, wl_cmd, sizeof(*wl_cmd));
955 if (ret < 0) {
969 return ret;
981 int ret;
994 ret = -EINVAL;
998 ret = wl1251_ps_elp_wakeup(wl);
999 if (ret < 0)
1003 ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE);
1004 if (ret < 0)
1006 ret = wl1251_join(wl, wl->bss_type, wl->channel,
1008 if (ret < 0)
1015 ret = -ENOMEM;
1021 ret = wl1251_cmd_template_set(wl, CMD_PROBE_REQ, skb->data,
1024 if (ret < 0)
1027 ret = wl1251_cmd_trigger_scan_to(wl, 0);
1028 if (ret < 0)
1033 ret = wl1251_cmd_scan(wl, ssid, ssid_len, req->channels,
1035 if (ret < 0) {
1036 wl1251_debug(DEBUG_SCAN, "scan failed %d", ret);
1044 ret = wl1251_ps_set_mode(wl, STATION_IDLE);
1051 return ret;
1057 int ret;
1061 ret = wl1251_ps_elp_wakeup(wl);
1062 if (ret < 0)
1065 ret = wl1251_acx_rts_threshold(wl, (u16) value);
1066 if (ret < 0)
1067 wl1251_warning("wl1251_op_set_rts_threshold failed: %d", ret);
1074 return ret;
1085 int ret;
1091 ret = wl1251_ps_elp_wakeup(wl);
1092 if (ret < 0)
1096 ret = wl1251_acx_low_rssi(wl, bss_conf->cqm_rssi_thold,
1100 if (ret < 0)
1110 ret = wl1251_build_null_data(wl);
1111 if (ret < 0)
1114 ret = wl1251_build_qos_null_data(wl);
1115 if (ret < 0)
1118 ret = wl1251_join(wl, wl->bss_type, wl->channel,
1120 if (ret < 0)
1133 ret = wl1251_cmd_template_set(wl, CMD_PS_POLL,
1137 if (ret < 0)
1140 ret = wl1251_acx_aid(wl, vif->cfg.aid);
1141 if (ret < 0)
1151 ret = wl1251_acx_slot(wl, SLOT_TIME_SHORT);
1153 ret = wl1251_acx_slot(wl, SLOT_TIME_LONG);
1154 if (ret < 0) {
1155 wl1251_warning("Set slot time failed %d", ret);
1169 ret = wl1251_acx_cts_protect(wl, CTSPROTECT_ENABLE);
1171 ret = wl1251_acx_cts_protect(wl, CTSPROTECT_DISABLE);
1172 if (ret < 0) {
1173 wl1251_warning("Set ctsprotect failed %d", ret);
1183 ret = wl1251_acx_arp_ip_filter(wl, enable, addr);
1184 if (ret < 0)
1193 ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data,
1196 if (ret < 0) {
1201 ret = wl1251_cmd_template_set(wl, CMD_PROBE_RESP, beacon->data,
1206 if (ret < 0)
1209 ret = wl1251_join(wl, wl->bss_type, wl->channel,
1212 if (ret < 0)
1291 int ret;
1297 ret = wl1251_ps_elp_wakeup(wl);
1298 if (ret < 0)
1302 ret = wl1251_acx_ac_cfg(wl, wl1251_tx_get_queue(queue),
1305 if (ret < 0)
1313 ret = wl1251_acx_tid_cfg(wl, wl1251_tx_get_queue(queue),
1317 if (ret < 0)
1326 return ret;
1398 int ret;
1403 ret = wl1251_read_eeprom_byte(wl, offset + i, &data[i]);
1404 if (ret < 0)
1405 return ret;
1414 int i, ret;
1418 ret = wl1251_read_eeprom(wl, 0x1c, mac, sizeof(mac));
1419 if (ret < 0) {
1421 return ret;
1453 int i, ret;
1455 ret = wl1251_check_nvs_mac(wl);
1456 if (ret)
1457 return ret;
1473 int i, ret;
1475 ret = wl1251_check_nvs_mac(wl);
1476 if (ret)
1477 return ret;
1488 int ret;
1495 ret = ieee80211_register_hw(wl->hw);
1496 if (ret < 0) {
1497 wl1251_error("unable to register mac80211 hw: %d", ret);
1498 return ret;
1510 int ret;
1536 ret = wl1251_fetch_nvs(wl);
1537 if (ret < 0)
1542 ret = wl1251_read_eeprom_mac(wl);
1544 ret = wl1251_read_nvs_mac(wl);
1546 if (ret == 0 && !is_valid_ether_addr(wl->mac_addr))
1547 ret = -EINVAL;
1549 if (ret < 0) {
1563 ret = wl1251_register_hw(wl);
1564 if (ret)
1570 ret = 0;
1573 return ret;