WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-May-11 10:28:05

Kevin20
Member
Registered: 2015-Aug-14
Posts: 21

Question on function configure_bss

Hi,

I am trying to understand the code in wlan_mac_ibss.c.
In configure_bss (called from main), there is this part where wlan_verify_channel is called to see if we are using a valid channel.


if (bss_config->update_mask & BSS_FIELD_MASK_CHAN) {
            if (wlan_verify_channel(
                    wlan_mac_high_bss_channel_spec_to_radio_chan(active_bss_info->chan_spec)) != XST_SUCCESS) {
                return_status |= BSS_CONFIG_FAILURE_CHANNEL_INVALID;
            }
        }


Before this paragraph, I just added a xil_printf to see if active_bss_info is NULL or not.


        if(active_bss_info == NULL) xil_printf("active_bss_info is NULL\n");
        else xil_printf("active_bss_info is NOT NULL\n");


When I run the code, it prints "active_bss_info is NULL".
I didn't modify any other part of the code. What could I be missing?

Thanks a lot.

Offline

 

#2 2016-May-11 10:43:50

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: Question on function configure_bss

I think what you are seeing makes sense. I suspect the print is happening before the BSS if fully configured and active_bss_info is still NULL.

For all 3 designs (AP, STA, IBSS), we use a NULL active_bss_info to indicate that the node is not a member of a BSS. At boot, the IBSS explicitly configures its active_bss_info to be null via the configure_bss() function. After it performs an active scan for a bit and if the MSB of the DIP switch is set to 0, it calls configure_bss() again with either (a) the BSS information it found during the active scan or (b) locally generated BSS information because it figured out there was no other "WARP-IBSS" nodes out there.

The active_bss_info should be NULL at the execution time of the first and second calls to configure_bss(). After the second call, the BSS will be fully configured and active_bss_info will be non-NULL. Another call to configure_bss() at this point should indicate this.

Offline

 

Board footer