Lines Matching refs:ret

59 	int ret;
74 ret = wlcore_write(wl, wl->cmd_box_addr, buf, len, false);
75 if (ret < 0)
76 return ret;
82 ret = wl->ops->trigger_cmd(wl, wl->cmd_box_addr, buf, len);
83 if (ret < 0)
84 return ret;
88 ret = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR, &intr);
89 if (ret < 0)
90 return ret;
104 ret = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR, &intr);
105 if (ret < 0)
106 return ret;
113 ret = wlcore_read(wl, wl->cmd_box_addr, cmd, res_len, false);
114 if (ret < 0)
115 return ret;
119 ret = wlcore_write_reg(wl, REG_INTERRUPT_ACK,
121 if (ret < 0)
122 return ret;
134 int ret = __wlcore_cmd_send(wl, id, buf, len, res_len);
136 if (ret < 0)
142 if (ret >= MAX_COMMAND_STATUS ||
143 !test_bit(ret, &valid_rets)) {
144 wl1271_error("command execute failure %d", ret);
145 ret = -EIO;
148 return ret;
151 return ret;
162 int ret = wlcore_cmd_send_failsafe(wl, id, buf, len, res_len, 0);
164 if (ret < 0)
165 return ret;
180 int ret = 0;
205 ret = wlcore_read(wl, wl->mbox_ptr[0], events_vector,
207 if (ret < 0)
212 ret = wlcore_read(wl, wl->mbox_ptr[1], events_vector,
214 if (ret < 0)
222 return ret;
230 int ret;
239 ret = -ENOMEM;
246 ret = -EBUSY;
253 ret = wl1271_cmd_send(wl, CMD_ROLE_ENABLE, cmd, sizeof(*cmd), 0);
254 if (ret < 0) {
266 return ret;
272 int ret;
281 ret = -ENOMEM;
286 ret = wl1271_cmd_send(wl, CMD_ROLE_DISABLE, cmd, sizeof(*cmd), 0);
287 if (ret < 0) {
299 return ret;
425 int ret;
429 ret = -ENOMEM;
441 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->dev_hlid);
442 if (ret)
451 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
452 if (ret < 0) {
467 return ret;
474 int ret;
481 ret = -ENOMEM;
491 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
492 if (ret < 0) {
503 return ret;
511 int ret;
515 ret = -ENOMEM;
542 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid);
543 if (ret)
561 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
562 if (ret < 0) {
578 return ret;
585 int ret;
592 ret = -ENOMEM;
602 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
603 if (ret < 0) {
614 return ret;
623 int ret;
630 ret = -EINVAL;
636 ret = -ENOMEM;
640 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.global_hlid);
641 if (ret < 0)
644 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.bcast_hlid);
645 if (ret < 0)
703 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
704 if (ret < 0) {
721 return ret;
727 int ret;
731 ret = -ENOMEM;
739 ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
740 if (ret < 0) {
752 return ret;
760 int ret;
764 ret = -ENOMEM;
784 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid);
785 if (ret)
799 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
800 if (ret < 0) {
815 return ret;
829 int ret;
837 ret = wl1271_cmd_send(wl, CMD_TEST, buf, buf_len, res_len);
839 if (ret < 0) {
841 return ret;
844 return ret;
860 int ret;
869 ret = wl1271_cmd_send(wl, CMD_INTERROGATE, acx, cmd_len, res_len);
870 if (ret < 0)
873 return ret;
890 int ret;
899 ret = wlcore_cmd_send_failsafe(wl, CMD_CONFIGURE, acx, len, 0,
901 if (ret < 0) {
903 return ret;
906 return ret;
915 int ret = wlcore_cmd_configure_failsafe(wl, id, buf, len, 0);
917 if (ret < 0)
918 return ret;
926 int ret;
933 ret = -ENOMEM;
948 ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0);
949 if (ret < 0) {
958 ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0);
959 if (ret < 0) {
970 return ret;
978 int ret = 0;
984 ret = -ENOMEM;
992 ret = wl1271_cmd_send(wl, CMD_SET_PS_MODE, ps_params,
994 if (ret < 0) {
1001 return ret;
1009 int ret = 0;
1019 ret = -ENOMEM;
1035 ret = wl1271_cmd_send(wl, CMD_SET_TEMPLATE, cmd, sizeof(*cmd), 0);
1036 if (ret < 0) {
1037 wl1271_warning("cmd set_template failed: %d", ret);
1045 return ret;
1053 int ret = -ENOMEM;
1068 ret = wl1271_cmd_template_set(wl, wlvif->role_id,
1074 if (ret)
1075 wl1271_warning("cmd buld null data failed %d", ret);
1077 return ret;
1086 int ret = -ENOMEM;
1092 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_KLV,
1099 if (ret)
1100 wl1271_warning("cmd build klv null data failed %d", ret);
1102 return ret;
1111 int ret = 0;
1117 ret = wl1271_cmd_template_set(wl, wlvif->role_id,
1123 return ret;
1134 int ret;
1144 ret = -ENOMEM;
1160 ret = wl1271_cmd_template_set(wl, role_id,
1164 ret = wl1271_cmd_template_set(wl, role_id,
1170 return ret;
1179 int ret;
1191 ret = wl1271_cmd_template_set(wl, wlvif->role_id,
1195 ret = wl1271_cmd_template_set(wl, wlvif->role_id,
1199 if (ret < 0)
1208 int ret, extra = 0;
1261 ret = -EINVAL;
1290 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_ARP_RSP,
1295 return ret;
1325 int ret = 0;
1331 ret = -ENOMEM;
1341 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
1342 if (ret < 0) {
1343 wl1271_warning("cmd set_default_wep_key failed: %d", ret);
1350 return ret;
1359 int ret = 0;
1367 ret = -ENOMEM;
1406 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
1407 if (ret < 0) {
1415 return ret;
1428 int ret = 0;
1473 ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
1474 if (ret < 0) {
1481 return ret;
1488 int ret = 0;
1494 ret = -ENOMEM;
1505 ret = wl1271_cmd_send(wl, CMD_SET_PEER_STATE, cmd, sizeof(*cmd), 0);
1506 if (ret < 0) {
1515 return ret;
1522 int i, ret;
1529 ret = -ENOMEM;
1564 ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0);
1565 if (ret < 0) {
1574 return ret;
1581 int ret;
1588 ret = -ENOMEM;
1598 ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0);
1599 if (ret < 0) {
1604 ret = wl->ops->wait_for_event(wl,
1613 if (ret)
1620 return ret;
1681 int ret = 0, i, b, ch_bit_idx;
1723 ret = -ENOMEM;
1734 ret = wl1271_cmd_send(wl, CMD_DFS_CHANNEL_CONFIG, cmd, sizeof(*cmd), 0);
1735 if (ret < 0) {
1740 ret = wl->ops->wait_for_event(wl,
1743 if (ret < 0 || timeout) {
1746 ret = timeout ? -ETIMEDOUT : ret;
1755 return ret;
1761 int ret = 0;
1767 ret = -ENOMEM;
1777 ret = wl1271_cmd_send(wl, CMD_CONFIG_FWLOGGER, cmd, sizeof(*cmd), 0);
1778 if (ret < 0) {
1787 return ret;
1793 int ret = 0;
1799 ret = -ENOMEM;
1803 ret = wl1271_cmd_send(wl, CMD_START_FWLOGGER, cmd, sizeof(*cmd), 0);
1804 if (ret < 0) {
1813 return ret;
1819 int ret = 0;
1825 ret = -ENOMEM;
1829 ret = wl1271_cmd_send(wl, CMD_STOP_FWLOGGER, cmd, sizeof(*cmd), 0);
1830 if (ret < 0) {
1839 return ret;
1846 int ret = 0;
1855 ret = -ENOMEM;
1870 ret = -EINVAL;
1875 ret = wl1271_cmd_send(wl, CMD_REMAIN_ON_CHANNEL, cmd, sizeof(*cmd), 0);
1876 if (ret < 0) {
1885 return ret;
1891 int ret = 0;
1897 ret = -ENOMEM;
1902 ret = wl1271_cmd_send(wl, CMD_CANCEL_REMAIN_ON_CHANNEL, cmd,
1904 if (ret < 0) {
1913 return ret;
1919 int ret = 0;
1924 ret = wl12xx_cmd_roc(wl, wlvif, role_id, band, channel);
1925 if (ret < 0)
1930 return ret;
1935 int ret = 0;
1940 ret = wl12xx_cmd_croc(wl, role_id);
1941 if (ret < 0)
1954 return ret;
1960 int ret;
1966 ret = -ENOMEM;
1972 ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0);
1973 if (ret < 0) {
1982 return ret;
1989 int ret;
1995 ret = wl12xx_cmd_role_enable(wl,
1999 if (ret < 0)
2002 ret = wl12xx_cmd_role_start_dev(wl, wlvif, band, channel);
2003 if (ret < 0)
2006 ret = wl12xx_roc(wl, wlvif, wlvif->dev_role_id, band, channel);
2007 if (ret < 0)
2017 return ret;
2023 int ret;
2030 ret = wlcore_tx_work_locked(wl);
2031 if (ret < 0)
2035 ret = wl12xx_croc(wl, wlvif->dev_role_id);
2036 if (ret < 0)
2040 ret = wl12xx_cmd_role_stop_dev(wl, wlvif);
2041 if (ret < 0)
2044 ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
2045 if (ret < 0)
2049 return ret;