Changes in uspace/drv/nic/ar9271/wmi.c [b7fd2a0:cde999a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ar9271/wmi.c
rb7fd2a0 rcde999a 50 50 * 51 51 */ 52 errno_t wmi_reg_read(htc_device_t *htc_device, uint32_t reg_offset, uint32_t *res)52 int wmi_reg_read(htc_device_t *htc_device, uint32_t reg_offset, uint32_t *res) 53 53 { 54 54 uint32_t cmd_value = host2uint32_t_be(reg_offset); … … 57 57 malloc(htc_device->ath_device->ctrl_response_length); 58 58 59 errno_t rc = wmi_send_command(htc_device, WMI_REG_READ,59 int rc = wmi_send_command(htc_device, WMI_REG_READ, 60 60 (uint8_t *) &cmd_value, sizeof(cmd_value), resp_buffer); 61 61 … … 82 82 * 83 83 */ 84 errno_t wmi_reg_write(htc_device_t *htc_device, uint32_t reg_offset, uint32_t val)84 int wmi_reg_write(htc_device_t *htc_device, uint32_t reg_offset, uint32_t val) 85 85 { 86 86 uint32_t cmd_buffer[] = { … … 92 92 malloc(htc_device->ath_device->ctrl_response_length); 93 93 94 errno_t rc = wmi_send_command(htc_device, WMI_REG_WRITE,94 int rc = wmi_send_command(htc_device, WMI_REG_WRITE, 95 95 (uint8_t *) &cmd_buffer, sizeof(cmd_buffer), resp_buffer); 96 96 … … 115 115 * 116 116 */ 117 errno_t wmi_reg_set_clear_bit(htc_device_t *htc_device, uint32_t reg_offset,117 int wmi_reg_set_clear_bit(htc_device_t *htc_device, uint32_t reg_offset, 118 118 uint32_t set_bit, uint32_t clear_bit) 119 119 { 120 120 uint32_t value; 121 121 122 errno_t rc = wmi_reg_read(htc_device, reg_offset, &value);122 int rc = wmi_reg_read(htc_device, reg_offset, &value); 123 123 if (rc != EOK) { 124 124 usb_log_error("Failed to read registry value in RMW " … … 149 149 * 150 150 */ 151 errno_t wmi_reg_set_bit(htc_device_t *htc_device, uint32_t reg_offset,151 int wmi_reg_set_bit(htc_device_t *htc_device, uint32_t reg_offset, 152 152 uint32_t set_bit) 153 153 { … … 164 164 * 165 165 */ 166 errno_t wmi_reg_clear_bit(htc_device_t *htc_device, uint32_t reg_offset,166 int wmi_reg_clear_bit(htc_device_t *htc_device, uint32_t reg_offset, 167 167 uint32_t clear_bit) 168 168 { … … 179 179 * 180 180 */ 181 errno_t wmi_reg_buffer_write(htc_device_t *htc_device, wmi_reg_t *reg_buffer,181 int wmi_reg_buffer_write(htc_device_t *htc_device, wmi_reg_t *reg_buffer, 182 182 size_t elements) 183 183 { … … 198 198 } 199 199 200 errno_t rc = wmi_send_command(htc_device, WMI_REG_WRITE,200 int rc = wmi_send_command(htc_device, WMI_REG_WRITE, 201 201 (uint8_t *) buffer, buffer_size, resp_buffer); 202 202 … … 223 223 * 224 224 */ 225 errno_t wmi_send_command(htc_device_t *htc_device, wmi_command_t command_id,225 int wmi_send_command(htc_device_t *htc_device, wmi_command_t command_id, 226 226 uint8_t *command_buffer, uint32_t command_length, void *response_buffer) 227 227 { … … 242 242 243 243 /* Send message. */ 244 errno_t rc = htc_send_control_message(htc_device, buffer, buffer_size,244 int rc = htc_send_control_message(htc_device, buffer, buffer_size, 245 245 htc_device->endpoints.wmi_endpoint); 246 246 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.