Ignore:
File:
1 edited

Legend:

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

    ree2fa30a r6b82009  
    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  */
    241 static 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 
    255230/** Process the netif module messages.
    256231 *
     
    282257                return EOK;
    283258       
    284         async_sess_t *callback =
    285             async_callback_receive_start(EXCHANGE_SERIALIZE, call);
    286         if (callback)
    287                 return register_message(callback);
    288        
    289259        switch (IPC_GET_IMETHOD(*call)) {
    290260        case NET_NETIF_PROBE:
     
    388358 * messages in an infinite loop.
    389359 *
     360 * @param[in] nil_service Network interface layer service.
     361 *
    390362 * @return EOK on success.
    391363 * @return Other error codes as defined for each specific module
     
    393365 *
    394366 */
    395 int netif_module_start(void)
     367int netif_module_start(sysarg_t nil_service)
    396368{
    397369        async_set_client_connection(netif_client_connection);
    398370       
    399371        netif_globals.sess = connect_to_service(SERVICE_NETWORKING);
    400         netif_globals.nil_sess = NULL;
     372        netif_globals.nil_sess = connect_to_service(nil_service);
    401373        netif_device_map_initialize(&netif_globals.device_map);
    402374       
Note: See TracChangeset for help on using the changeset viewer.