Changeset ee2fa30a in mainline for uspace/lib/net/netif/netif_skel.c


Ignore:
Timestamp:
2011-06-22T23:28:56Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b366a6f4
Parents:
ef09a7a
Message:

undo development effort which was neither finished nor properly debugged yet
(this unbreaks networking once again)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/netif/netif_skel.c

    ref09a7a ree2fa30a  
    228228}
    229229
     230/** Register the device notification receiver,
     231 *
     232 * Register a network interface layer module as the device
     233 * notification receiver.
     234 *
     235 * @param[in] sess      Session to the network interface layer module.
     236 *
     237 * @return EOK on success.
     238 * @return ELIMIT if there is another module registered.
     239 *
     240 */
     241static int register_message(async_sess_t *sess)
     242{
     243        fibril_rwlock_write_lock(&netif_globals.lock);
     244        if (netif_globals.nil_sess != NULL) {
     245                fibril_rwlock_write_unlock(&netif_globals.lock);
     246                return ELIMIT;
     247        }
     248       
     249        netif_globals.nil_sess = sess;
     250       
     251        fibril_rwlock_write_unlock(&netif_globals.lock);
     252        return EOK;
     253}
     254
    230255/** Process the netif module messages.
    231256 *
     
    257282                return EOK;
    258283       
     284        async_sess_t *callback =
     285            async_callback_receive_start(EXCHANGE_SERIALIZE, call);
     286        if (callback)
     287                return register_message(callback);
     288       
    259289        switch (IPC_GET_IMETHOD(*call)) {
    260290        case NET_NETIF_PROBE:
     
    358388 * messages in an infinite loop.
    359389 *
    360  * @param[in] nil_service Network interface layer service.
    361  *
    362390 * @return EOK on success.
    363391 * @return Other error codes as defined for each specific module
     
    365393 *
    366394 */
    367 int netif_module_start(sysarg_t nil_service)
     395int netif_module_start(void)
    368396{
    369397        async_set_client_connection(netif_client_connection);
    370398       
    371399        netif_globals.sess = connect_to_service(SERVICE_NETWORKING);
    372         netif_globals.nil_sess = connect_to_service(nil_service);
     400        netif_globals.nil_sess = NULL;
    373401        netif_device_map_initialize(&netif_globals.device_map);
    374402       
Note: See TracChangeset for help on using the changeset viewer.