Changes in uspace/lib/nic/src/nic_impl.c [9cd8165:cf9cb36] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_impl.c
r9cd8165 rcf9cb36 87 87 } 88 88 if (state == NIC_STATE_ACTIVE) { 89 if (nic_data->client_session == NULL ) {89 if (nic_data->client_session == NULL || nic_data->device_id < 0) { 90 90 fibril_rwlock_write_unlock(&nic_data->main_lock); 91 91 return EINVAL; … … 118 118 /* Notify upper layers that we are reseting the MAC */ 119 119 int rc = nic_ev_addr_changed(nic_data->client_session, 120 &nic_data->default_mac);120 nic_data->device_id, &nic_data->default_mac); 121 121 nic_data->poll_mode = nic_data->default_poll_mode; 122 122 memcpy(&nic_data->poll_period, &nic_data->default_poll_period, … … 150 150 nic_data->state = state; 151 151 152 nic_ev_device_state(nic_data->client_session, state);152 nic_ev_device_state(nic_data->client_session, nic_data->device_id, state); 153 153 154 154 fibril_rwlock_write_unlock(&nic_data->main_lock); … … 187 187 * 188 188 * @param fun 189 * @param device_id ID of the device as used in higher layers 189 190 * 190 191 * @return EOK On success, or negative error code. 191 192 */ 192 int nic_callback_create_impl(ddf_fun_t *fun )193 int nic_callback_create_impl(ddf_fun_t *fun, nic_device_id_t device_id) 193 194 { 194 195 nic_t *nic = (nic_t *) fun->driver_data; 195 196 fibril_rwlock_write_lock(&nic->main_lock); 197 198 nic->device_id = device_id; 196 199 197 200 nic->client_session = async_callback_receive(EXCHANGE_SERIALIZE);
Note:
See TracChangeset
for help on using the changeset viewer.