Beispiel #1
0
/*
 * Node table support.
 */
void
wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt)
{
    int i;

    AR_DEBUG_PRINTF(ATH_DEBUG_WLAN, ("node table = 0x%x\n", (A_UINT32)nt));
    IEEE80211_NODE_LOCK_INIT(nt);

    A_REGISTER_MODULE_DEBUG_INFO(wlan);
    
    nt->nt_node_first = nt->nt_node_last = NULL;
    for(i = 0; i < IEEE80211_NODE_HASHSIZE; i++)
    {
        nt->nt_hash[i] = NULL;
    }

    A_INIT_TIMER(&nt->nt_inact_timer, wlan_node_timeout, nt);
    nt->isTimerArmed = FALSE;
    nt->nt_wmip = wmip;
    nt->nt_nodeAge = WLAN_NODE_INACT_TIMEOUT_MSEC;

    //
    // nt_scangen never initialized before and during suspend/resume of winmobile, 
    // that some junk has been stored in this, due to this scan list didn't properly updated
    //
    nt->nt_scangen   = 0;

#ifdef OS_ROAM_MANAGEMENT
    nt->nt_si_gen    = 0;
#endif
}
Beispiel #2
0
/*
 * Node table support.
 */
void
wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt)
{
	int i;
    WLAN_DEBUG_PRINTF(ATH_LOG_INF,"node table = 0x%x\n", (A_UINT32)nt);
    IEEE80211_NODE_LOCK_INIT(nt);
    nt->nt_node_first = nt->nt_node_last = NULL;
    for(i = 0; i < IEEE80211_NODE_HASHSIZE; i++)
    {
        nt->nt_hash[i] = NULL;
    }
    A_INIT_TIMER(&nt->nt_inact_timer, wlan_node_timeout, nt);
    A_TIMEOUT_MS(&nt->nt_inact_timer, WLAN_NODE_INACT_TIMEOUT_MSEC, 0);
    nt->nt_wmip = wmip;
}
Beispiel #3
0
LOCAL void console_mod_init(CONSOLE_CONFIG *config)
{
    UART_HW_CONFIG  uart_config;
    void            *phys_port;
    int             i;
    
    if (Console_info != NULL) {
        return;    
    }
    
    Console_info = (CONSOLE_INFO *)A_ALLOCRAM(sizeof(CONSOLE_INFO));
    
    if (config != NULL) {    
        Console_info->config = *config;
    }
    
    if (0 == Console_info->config.max_cmdline_length) {
        Console_info->config.max_cmdline_length = CONSOLE_DEF_MAX_LINE_CHARS;   
    }    
    if (0 == Console_info->config.max_history) {
        Console_info->config.max_history = CONSOLE_DEF_MAX_HISTORY;    
    }    
    if (0 == Console_info->config.phys_uart_id) {
        Console_info->config.phys_uart_id = UART_SERP_UART0_INSTANCE_ID;
        if (NULL == Console_info->config.logical_port_name) {
            Console_info->config.logical_port_name = (A_CHAR *)UART_PORT0_NAME;
        }        
        if (0 == Console_info->config.baud) {
            Console_info->config.baud = HOST_INTEREST->hi_desired_baud_rate;    
        }
    }    
    if (0 == Console_info->config.baud) {
        Console_info->config.baud = CONSOLE_DEF_BAUDRATE;      
    } 
    if (0 == Console_info->config.max_argv_len) {
        Console_info->config.max_argv_len = CONSOLE_DEF_MAX_ARGV_LENGTH;    
    }
    if (0 == Console_info->config.output_buffer_size) {
        Console_info->config.output_buffer_size = CONSOLE_TRANSMIT_BUFFER_SIZE;    
    }   
    if (0 == Console_info->config.idle_timeout_ms) {
        Console_info->config.idle_timeout_ms = CONSOLE_RECV_IDLE_TIMEOUT_MS;
    }
    
    Console_info->history_length = Console_info->config.max_cmdline_length + 1;   
    Console_info->history_buffer = (A_CHAR *)A_ALLOCRAM(Console_info->history_length * 
                                                        Console_info->config.max_history);   
    Console_info->current_line = (A_CHAR *)A_ALLOCRAM(Console_info->config.max_cmdline_length + 1);
    
    for (i = 0; i < CONSOLE_DEF_MAX_ARGC; i++) {
        Console_info->argv_buffers[i] = (A_CHAR *)A_ALLOCRAM(Console_info->config.max_argv_len + 1);
    }
    
        /* setup the physical modem */
    phys_port = UARTSERP_HW_Init(Console_info->config.phys_uart_id);
    A_ASSERT(phys_port != NULL);  
    A_MEMZERO(&uart_config,sizeof(uart_config));        
        /* for the console, set UART buffering parameters
         * for recv we can use a fixed value to accommodate very fast typists */
    uart_config.RxBufferSize = CONSOLE_RECV_BUFFER_SIZE;
        /* use a value that is an override */
    uart_config.TxBufferSize = Console_info->config.output_buffer_size;
    UARTSERP_HW_Start(phys_port,&uart_config);
    
    A_INIT_TIMER(&Console_info->recv_idle_timer,
                 console_recv_idle_timeout,
                 NULL);
                 
    A_TIMER_SET_FLAGS(&Console_info->recv_idle_timer,TIMER_FLAGS_NO_FORCE_DISARM);  
}