Discussion:
[ath9k-devel] tx99 memory allocate failure
Mathieu Slabbinck
2016-05-17 13:52:08 UTC
Permalink
Hi,

I'm having some issues running the tx99 features of the ath9k driver.
Seems like every time I try to run it, I get this:
sh: write error: cannot allocate memory.

After some poking, I found it's returning -ENOMEN in tx99.c.
Which is due to !sc-tx99_skb
Which on it's turn is due to an empty value for sc->tx99_vif.

So essentially, it's going wrong in ath9k_build_tx99_skb and returns NULL
when checking:
if (!sc->tx99_vif) {
return NULL;
}

Anybody some ideas on what the actual root cause can be of this and/or how
to solve it?

Kernel version: 4.1.0

Thanks & Kr

Mathieu
Mathieu Slabbinck
2016-05-17 14:11:57 UTC
Permalink
Hi Eduardo,

I'm using this:
#!/bin/bash
mount -t debugfs nodev /sys/kernel/debug

echo "Prep for tx99"
iw phy phy0 interface add moni0 type monitor
ip link set dev moni0 up

echo "Activating tx99"
echo 15 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99

Is that not enough?
Ifconfig lists moni0 as follows:
moni0 Link encap:UNSPEC HWaddr
BC-30-7E-BC-59-98-35-65-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B

Kr

On Tue, May 17, 2016 at 4:07 PM, Eduardo Abinader <
***@riverbed.com> wrote:

> Hi,
>
> Create the monitor interface with active flag set.
>
> BR.
> ------------------------------
> *From:* ath9k-devel-***@lists.ath9k.org [
> ath9k-devel-***@lists.ath9k.org] on behalf of Mathieu Slabbinck [
> ***@gmail.com]
> *Sent:* Tuesday, May 17, 2016 3:52 PM
> *To:* ath9k-***@lists.ath9k.org
> *Subject:* [ath9k-devel] tx99 memory allocate failure
>
> Hi,
>
> I'm having some issues running the tx99 features of the ath9k driver.
> Seems like every time I try to run it, I get this:
> sh: write error: cannot allocate memory.
>
> After some poking, I found it's returning -ENOMEN in tx99.c.
> Which is due to !sc-tx99_skb
> Which on it's turn is due to an empty value for sc->tx99_vif.
>
> So essentially, it's going wrong in ath9k_build_tx99_skb and returns NULL
> when checking:
> if (!sc->tx99_vif) {
> return NULL;
> }
>
> Anybody some ideas on what the actual root cause can be of this and/or how
> to solve it?
>
> Kernel version: 4.1.0
>
> Thanks & Kr
>
> Mathieu
>
Eduardo Abinader
2016-05-17 14:16:18 UTC
Permalink
Hi Mathieu,

Add the monitor interface like this:

#iw phy phy0 interface add moni0 type monitor flags active


BR,
Eduardo Abinader
________________________________
From: Mathieu Slabbinck [***@gmail.com]
Sent: Tuesday, May 17, 2016 4:11 PM
To: Eduardo Abinader
Cc: ath9k-***@lists.ath9k.org
Subject: Re: [ath9k-devel] tx99 memory allocate failure

Hi Eduardo,

I'm using this:
#!/bin/bash
mount -t debugfs nodev /sys/kernel/debug

echo "Prep for tx99"
iw phy phy0 interface add moni0 type monitor
ip link set dev moni0 up

echo "Activating tx99"
echo 15 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99

Is that not enough?
Ifconfig lists moni0 as follows:
moni0 Link encap:UNSPEC HWaddr BC-30-7E-BC-59-98-35-65-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B

Kr

On Tue, May 17, 2016 at 4:07 PM, Eduardo Abinader <***@riverbed.com<mailto:***@riverbed.com>> wrote:
Hi,

Create the monitor interface with active flag set.

BR.
________________________________
From: ath9k-devel-***@lists.ath9k.org<mailto:ath9k-devel-***@lists.ath9k.org> [ath9k-devel-***@lists.ath9k.org<mailto:ath9k-devel-***@lists.ath9k.org>] on behalf of Mathieu Slabbinck [***@gmail.com<mailto:***@gmail.com>]
Sent: Tuesday, May 17, 2016 3:52 PM
To: ath9k-***@lists.ath9k.org<mailto:ath9k-***@lists.ath9k.org>
Subject: [ath9k-devel] tx99 memory allocate failure

Hi,

I'm having some issues running the tx99 features of the ath9k driver.
Seems like every time I try to run it, I get this:
sh: write error: cannot allocate memory.

After some poking, I found it's returning -ENOMEN in tx99.c.
Which is due to !sc-tx99_skb
Which on it's turn is due to an empty value for sc->tx99_vif.

So essentially, it's going wrong in ath9k_build_tx99_skb and returns NULL when checking:
if (!sc->tx99_vif) {
return NULL;
}

Anybody some ideas on what the actual root cause can be of this and/or how to solve it?

Kernel version: 4.1.0

Thanks & Kr

Mathieu
Mathieu Slabbinck
2016-05-17 14:23:07 UTC
Permalink
Solved!

Thanks a bunch!!!

Kr
Mathieu

On Tue, May 17, 2016 at 4:16 PM, Eduardo Abinader <
***@riverbed.com> wrote:

> Hi Mathieu,
>
> Add the monitor interface like this:
>
> #iw phy phy0 interface add moni0 type monitor flags active
>
>
> BR,
> Eduardo Abinader
> ------------------------------
> *From:* Mathieu Slabbinck [***@gmail.com]
> *Sent:* Tuesday, May 17, 2016 4:11 PM
> *To:* Eduardo Abinader
> *Cc:* ath9k-***@lists.ath9k.org
> *Subject:* Re: [ath9k-devel] tx99 memory allocate failure
>
> Hi Eduardo,
>
> I'm using this:
> #!/bin/bash
> mount -t debugfs nodev /sys/kernel/debug
>
> echo "Prep for tx99"
> iw phy phy0 interface add moni0 type monitor
> ip link set dev moni0 up
>
> echo "Activating tx99"
> echo 15 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power
> echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99
>
> Is that not enough?
> Ifconfig lists moni0 as follows:
> moni0 Link encap:UNSPEC HWaddr
> BC-30-7E-BC-59-98-35-65-00-00-00-00-00-00-00-00
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B
>
> Kr
>
> On Tue, May 17, 2016 at 4:07 PM, Eduardo Abinader <
> ***@riverbed.com> wrote:
>
>> Hi,
>>
>> Create the monitor interface with active flag set.
>>
>> BR.
>> ------------------------------
>> *From:* ath9k-devel-***@lists.ath9k.org [
>> ath9k-devel-***@lists.ath9k.org] on behalf of Mathieu Slabbinck [
>> ***@gmail.com]
>> *Sent:* Tuesday, May 17, 2016 3:52 PM
>> *To:* ath9k-***@lists.ath9k.org
>> *Subject:* [ath9k-devel] tx99 memory allocate failure
>>
>> Hi,
>>
>> I'm having some issues running the tx99 features of the ath9k driver.
>> Seems like every time I try to run it, I get this:
>> sh: write error: cannot allocate memory.
>>
>> After some poking, I found it's returning -ENOMEN in tx99.c.
>> Which is due to !sc-tx99_skb
>> Which on it's turn is due to an empty value for sc->tx99_vif.
>>
>> So essentially, it's going wrong in ath9k_build_tx99_skb and returns NULL
>> when checking:
>> if (!sc->tx99_vif) {
>> return NULL;
>> }
>>
>> Anybody some ideas on what the actual root cause can be of this and/or
>> how to solve it?
>>
>> Kernel version: 4.1.0
>>
>> Thanks & Kr
>>
>> Mathieu
>>
>
>
Loading...