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