Changes in uspace/drv/nic/ne2k/ne2k.c [b7fd2a0:01c3bb4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ne2k/ne2k.c
rb7fd2a0 r01c3bb4 124 124 static void ne2k_interrupt_handler(ipc_call_t *, ddf_dev_t *); 125 125 126 static errno_t ne2k_register_interrupt(nic_t *nic_data, cap_handle_t *handle)126 static int ne2k_register_interrupt(nic_t *nic_data) 127 127 { 128 128 ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data); … … 160 160 } 161 161 162 return register_interrupt_handler(nic_get_ddf_dev(nic_data), 163 ne2k->irq, ne2k_interrupt_handler, &ne2k->code, handle); 162 int irq_cap = register_interrupt_handler(nic_get_ddf_dev(nic_data), 163 ne2k->irq, ne2k_interrupt_handler, &ne2k->code); 164 return irq_cap; 164 165 } 165 166 … … 178 179 } 179 180 180 static errno_t ne2k_dev_init(nic_t *nic_data)181 static int ne2k_dev_init(nic_t *nic_data) 181 182 { 182 183 /* Get HW resources */ … … 184 185 hw_res_list_parsed_init(&hw_res_parsed); 185 186 186 errno_t rc = nic_get_resources(nic_data, &hw_res_parsed);187 int rc = nic_get_resources(nic_data, &hw_res_parsed); 187 188 188 189 if (rc != EOK) … … 227 228 ne2k->probed = true; 228 229 229 if (ne2k_register_interrupt(nic_data, NULL) != EOK) 230 int irq_cap = ne2k_register_interrupt(nic_data); 231 if (irq_cap < 0) 230 232 return EINVAL; 231 233 … … 243 245 } 244 246 245 static errno_t ne2k_on_activating(nic_t *nic_data)247 static int ne2k_on_activating(nic_t *nic_data) 246 248 { 247 249 ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data); 248 250 249 251 if (!ne2k->up) { 250 errno_t rc = ne2k_up(ne2k);252 int rc = ne2k_up(ne2k); 251 253 if (rc != EOK) 252 254 return rc; … … 261 263 } 262 264 263 static errno_t ne2k_on_stopping(nic_t *nic_data)265 static int ne2k_on_stopping(nic_t *nic_data) 264 266 { 265 267 ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data); … … 271 273 } 272 274 273 static errno_t ne2k_set_address(ddf_fun_t *fun, const nic_address_t *address)275 static int ne2k_set_address(ddf_fun_t *fun, const nic_address_t *address) 274 276 { 275 277 nic_t *nic_data = DRIVER_DATA(ddf_fun_get_dev(fun)); 276 errno_t rc = nic_report_address(nic_data, address);278 int rc = nic_report_address(nic_data, address); 277 279 if (rc != EOK) { 278 280 return EINVAL; … … 286 288 } 287 289 288 static errno_t ne2k_on_unicast_mode_change(nic_t *nic_data,290 static int ne2k_on_unicast_mode_change(nic_t *nic_data, 289 291 nic_unicast_mode_t new_mode, 290 292 const nic_address_t *address_list, size_t address_count) … … 313 315 } 314 316 315 static errno_t ne2k_on_multicast_mode_change(nic_t *nic_data,317 static int ne2k_on_multicast_mode_change(nic_t *nic_data, 316 318 nic_multicast_mode_t new_mode, 317 319 const nic_address_t *address_list, size_t address_count) … … 339 341 } 340 342 341 static errno_t ne2k_on_broadcast_mode_change(nic_t *nic_data,343 static int ne2k_on_broadcast_mode_change(nic_t *nic_data, 342 344 nic_broadcast_mode_t new_mode) 343 345 { … … 355 357 } 356 358 357 static errno_t ne2k_dev_add(ddf_dev_t *dev)359 static int ne2k_dev_add(ddf_dev_t *dev) 358 360 { 359 361 ddf_fun_t *fun; … … 387 389 } 388 390 389 errno_t rc = ne2k_dev_init(nic_data);391 int rc = ne2k_dev_init(nic_data); 390 392 if (rc != EOK) { 391 393 ne2k_dev_cleanup(dev);
Note:
See TracChangeset
for help on using the changeset viewer.