Changeset 01380b1 in mainline


Ignore:
Timestamp:
2012-01-21T16:59:43Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e98fe28c
Parents:
ce7676c
Message:

libnic no longer needs net_session.

Location:
uspace/lib/nic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/include/nic_driver.h

    rce7676c r01380b1  
    8080        /** Device's default MAC address (assigned the first time, used in STOP) */
    8181        nic_address_t default_mac;
    82         /** Session to SERVICE_NETWORKING */
    83         async_sess_t *net_session;
    8482        /** Session to SERVICE_ETHERNET or SERVICE_NILDUMMY */
    8583        async_sess_t *nil_session;
  • uspace/lib/nic/src/nic_driver.c

    rce7676c r01380b1  
    4949#include <devman.h>
    5050#include <ddf/interrupt.h>
    51 #include <net_interface.h>
    5251#include <ops/nic.h>
    5352#include <errno.h>
     
    424423
    425424/**
    426  * Connect to the NET and IRQ services. This function should be called only from
     425 * Connect to IRC service. This function should be called only from
    427426 * the add_device handler, thus no locking is required.
    428427 *
     
    431430 * @return EOK          If connection was successful.
    432431 * @return EINVAL       If the IRC service cannot be determined.
    433  * @return EREFUSED     If NET or IRC service cannot be connected.
     432 * @return EREFUSED     If IRC service cannot be connected.
    434433 */
    435434int nic_connect_to_services(nic_t *nic_data)
    436435{
    437         /* NET service */
    438         nic_data->net_session = service_connect_blocking(EXCHANGE_SERIALIZE,
    439                 SERVICE_NETWORKING, 0, 0);
    440         if (nic_data->net_session == NULL)
    441                 return errno;
    442        
    443436        /* IRC service */
    444437        sysarg_t apic;
     
    699692        nic_data->device_id = NIC_DEVICE_INVALID_ID;
    700693        nic_data->state = NIC_STATE_STOPPED;
    701         nic_data->net_session = NULL;
    702694        nic_data->nil_session = NULL;
    703695        nic_data->irc_session = NULL;
     
    754746 */
    755747static void nic_destroy(nic_t *nic_data) {
    756         if (nic_data->net_session != NULL) {
    757                 async_hangup(nic_data->net_session);
    758         }
    759 
    760748        if (nic_data->nil_session != NULL) {
    761749                async_hangup(nic_data->nil_session);
  • uspace/lib/nic/src/nic_impl.c

    rce7676c r01380b1  
    8585        }
    8686        if (state == NIC_STATE_ACTIVE) {
    87                 if (nic_data->nil_session == NULL || nic_data->net_session == NULL
    88                     || nic_data->device_id < 0) {
     87                if (nic_data->nil_session == NULL || nic_data->device_id < 0) {
    8988                        fibril_rwlock_write_unlock(&nic_data->main_lock);
    9089                        return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.