Scanning problem for hidden SSIDs

Holger Schurig hs4233 at mail.mn-solutions.de
Mon Jun 25 07:57:30 EDT 2007


So far I don't have that much success. My function looks like this:

int libertas_send_null_packet(wlan_private *priv, u8 pwr_mgmt)
{
        wlan_adapter *adapter = priv->adapter;
        struct txpd nulltxpd;
        int ret = -1;

        lbs_deb_enter_args(LBS_DEB_SCAN, "pwr_mgmt %02x", pwr_mgmt);

        if (adapter->surpriseremoved)
                goto out;

        memset(&nulltxpd, 0, sizeof(nulltxpd));
        nulltxpd.tx_control = cpu_to_le32(adapter->pkttxctrl);
        nulltxpd.powermgmt = pwr_mgmt;
        nulltxpd.tx_packet_location = sizeof(nulltxpd);

        memcpy(priv->adapter->tmptxbuf, &nulltxpd, sizeof(nulltxpd));

        ret = priv->hw_host_to_card(priv, MVMS_DAT,
                                    priv->adapter->tmptxbuf,
                                    sizeof(nulltxpd));

out:
        lbs_deb_enter_args(LBS_DEB_SCAN, "ret %d", ret);
        return ret;
}

and get's called this way:


        // Bit 0: null packet
        // Bit 1: override firmware power management (activates Bit 2)
        // Bit 2: power management bit on
        ret = libertas_send_null_packet(priv, 0x7);
or
        ret = libertas_send_null_packet(priv, 0x3);


My debug output says:

libertas enter: libertas_send_null_packet(pwr_mgmt 07):296
libertas_cs MVMS_DAT: 00 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00
libertas_cs MVMS_DAT: 00 00 00 00 00 07 00 00
##outw 00000014>0018
##outsw 00000016>(12 bytes)
##outw 00000000>0001
##outw 00000002>0001

So, my txpd looks like this:

TxStatus        00 00 00 00
TxControl       00 00 00 00
TxPacketLocat   18 00 00 00
TxPacketLength  00 00
TxDestAddrHi    00 00
TxDestAddrLo    00 00 00 00
Priority        00
Flags           07
Reserved        00 00

However, the card doesn't send any packet at all. I've also tried
to set the TxPacketLocation to 0, or to set the TxDestAddr to the
broadcast address. Whatever I do, the card won't send the power
management packets other cards send.




More information about the libertas-dev mailing list