Changeset 9cd8165 in mainline for uspace/lib/nic/src/nic_impl.c
- Timestamp:
- 2012-01-27T12:54:09Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 790d6d1
- Parents:
- 7174403
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_impl.c
r7174403 r9cd8165 87 87 } 88 88 if (state == NIC_STATE_ACTIVE) { 89 if (nic_data->client_session == NULL || nic_data->device_id < 0) {89 if (nic_data->client_session == NULL) { 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->device_id,&nic_data->default_mac);120 &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, nic_data->device_id,state);152 nic_ev_device_state(nic_data->client_session, 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 layers190 189 * 191 190 * @return EOK On success, or negative error code. 192 191 */ 193 int nic_callback_create_impl(ddf_fun_t *fun , nic_device_id_t device_id)192 int nic_callback_create_impl(ddf_fun_t *fun) 194 193 { 195 194 nic_t *nic = (nic_t *) fun->driver_data; 196 195 fibril_rwlock_write_lock(&nic->main_lock); 197 198 nic->device_id = device_id;199 196 200 197 nic->client_session = async_callback_receive(EXCHANGE_SERIALIZE);
Note:
See TracChangeset
for help on using the changeset viewer.