Changeset 984a9ba in mainline for uspace/srv/net/ethip
- Timestamp:
- 2018-07-05T09:34:09Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- Location:
- uspace/srv/net/ethip
- Files:
-
- 2 edited
-
ethip.c (modified) (3 diffs)
-
ethip_nic.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip.c
r76f566d r984a9ba 63 63 static errno_t ethip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr); 64 64 65 static void ethip_client_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg);65 static void ethip_client_conn(ipc_call_t *icall, void *arg); 66 66 67 67 static iplink_ops_t ethip_iplink_ops = { … … 142 142 } 143 143 144 static void ethip_client_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)144 static void ethip_client_conn(ipc_call_t *icall, void *arg) 145 145 { 146 146 ethip_nic_t *nic; … … 155 155 } 156 156 157 iplink_conn(icall _handle, icall, &nic->iplink);157 iplink_conn(icall, &nic->iplink); 158 158 } 159 159 -
uspace/srv/net/ethip/ethip_nic.c
r76f566d r984a9ba 52 52 53 53 static errno_t ethip_nic_open(service_id_t sid); 54 static void ethip_nic_cb_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg);54 static void ethip_nic_cb_conn(ipc_call_t *icall, void *arg); 55 55 56 56 static LIST_INITIALIZE(ethip_nic_list); … … 229 229 } 230 230 231 static void ethip_nic_addr_changed(ethip_nic_t *nic, cap_call_handle_t chandle, 232 ipc_call_t *call) 231 static void ethip_nic_addr_changed(ethip_nic_t *nic, ipc_call_t *call) 233 232 { 234 233 uint8_t *addr; … … 236 235 errno_t rc; 237 236 238 rc = async_data_write_accept((void **) &addr, false, 0, 0, 0, &size);237 rc = async_data_write_accept((void **) &addr, false, 0, 0, 0, &size); 239 238 if (rc != EOK) { 240 239 log_msg(LOG_DEFAULT, LVL_DEBUG, "data_write_accept() failed"); … … 255 254 256 255 free(addr); 257 async_answer_0(chandle, EOK); 258 } 259 260 static void ethip_nic_received(ethip_nic_t *nic, cap_call_handle_t chandle, 261 ipc_call_t *call) 256 async_answer_0(call, EOK); 257 } 258 259 static void ethip_nic_received(ethip_nic_t *nic, ipc_call_t *call) 262 260 { 263 261 errno_t rc; … … 282 280 283 281 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_received() done, rc=%s", str_error_name(rc)); 284 async_answer_0(chandle, rc); 285 } 286 287 static void ethip_nic_device_state(ethip_nic_t *nic, cap_call_handle_t chandle, 288 ipc_call_t *call) 282 async_answer_0(call, rc); 283 } 284 285 static void ethip_nic_device_state(ethip_nic_t *nic, ipc_call_t *call) 289 286 { 290 287 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_device_state()"); 291 async_answer_0(c handle, ENOTSUP);292 } 293 294 static void ethip_nic_cb_conn( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)288 async_answer_0(call, ENOTSUP); 289 } 290 291 static void ethip_nic_cb_conn(ipc_call_t *icall, void *arg) 295 292 { 296 293 ethip_nic_t *nic = (ethip_nic_t *)arg; … … 300 297 while (true) { 301 298 ipc_call_t call; 302 cap_call_handle_t chandle =async_get_call(&call);299 async_get_call(&call); 303 300 304 301 if (!IPC_GET_IMETHOD(call)) { … … 309 306 switch (IPC_GET_IMETHOD(call)) { 310 307 case NIC_EV_ADDR_CHANGED: 311 ethip_nic_addr_changed(nic, chandle,&call);308 ethip_nic_addr_changed(nic, &call); 312 309 break; 313 310 case NIC_EV_RECEIVED: 314 ethip_nic_received(nic, chandle,&call);311 ethip_nic_received(nic, &call); 315 312 break; 316 313 case NIC_EV_DEVICE_STATE: 317 ethip_nic_device_state(nic, chandle,&call);314 ethip_nic_device_state(nic, &call); 318 315 break; 319 316 default: 320 317 log_msg(LOG_DEFAULT, LVL_DEBUG, "unknown IPC method: %" PRIun, IPC_GET_IMETHOD(call)); 321 async_answer_0( chandle, ENOTSUP);318 async_answer_0(&call, ENOTSUP); 322 319 } 323 320 }
Note:
See TracChangeset
for help on using the changeset viewer.
