C/airpcap-nl.c
/* Unfortunately, it does not appear that nl80211 has any method of
 * returning the current center frequency of the device.
 *
 * Also, it seems that at least on my kernel, 2.6.38-12-generic, iwlagn or
 * cfg80211's wext-compat layer lies about the current frequency.
 * I will query linux-wireless about this.
 *
 * So, for now, we simply return the last channel that was set. AirPcaps are
 * set to 6 by default, so we choose to force it to a known channel on
 * AirpcapOpen. */
Unfortunately, it does not appear that nl80211 has any method of
returning the current center frequency of the device.

Also, it seems that at least on my kernel, 2.6.38-12-generic, iwlagn or
cfg80211's wext-compat layer lies about the current frequency.
I will query linux-wireless about this.

So, for now, we simply return the last channel that was set. AirPcaps are
set to 6 by default, so we choose to force it to a known channel on
AirpcapOpen.
Unfortunately it does not appear that nl80211 has any method of returning the current center frequency of the device . Also it seems that at least on my kernel 2 . 6 . 38 - 12 - generic iwlagn or cfg80211 ' s wext - compat layer lies about the current frequency . I will query linux - wireless about this . So for now we simply return the last channel that was set . AirPcaps are set to 6 by default so we choose to force it to a known channel on AirpcapOpen .
BOOL AirpcapGetDeviceChannelEx(PAirpcapHandle AdapterHandle,
                               PAirpcapChannelInfo PChannelInfo)
{
    BOOL ret = FALSE;
    if (AdapterHandle) {
        memcpy(PChannelInfo, &AdapterHandle->current_channel,
               sizeof(*PChannelInfo));
        ret = TRUE;
    }
    return ret;
}
BOOL AirpcapGetDeviceChannelEx ( PAirpcapHandle AdapterHandle , PAirpcapChannelInfo PChannelInfo ) { BOOL ret = FALSE ; if ( AdapterHandle ) { memcpy ( PChannelInfo , & AdapterHandle -> current_channel , sizeof ( * PChannelInfo ) ) ; ret = TRUE ; } return ret ; }
Unfortunately, it does not appear that nl80211 has any method of
 returning the current center frequency of the device.
Unfortunately it does not appear that nl80211 has any method of returning the current center frequency of the device .