Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Thomas Wagner <thomas.wagner@hs-rm.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] Frames droped on Linksys WRT160NL Router
Date: Sun, 29 Jul 2012 18:30:39 +0200	[thread overview]
Message-ID: <9811600.PToINpAW92@buri> (raw)

Hi,

I am trying to set up a 802.11s Meshnetwork using OpenWRT SVN trunk on a couple of Linksys WRT160NL Router (with compat-wireless-2012-06-14).
The peers between the routers are established like expected but on sending IP traffic there is no reaction.

I monitored the wireless lan traffic using wireshark and I noticed that there where ARP-Request-Packages send but none of my routers react on them.
Expanding "arp.c" in compat-wireless with an printk()-message  showed that the ARP-Pakage were not passed to "arp.c".

Perhaps the error is in the MAC80211 layer? So I expand net/mac80211/rx.c:

void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
	/*.....*/
	#define macaddr__stm "%X-%X-%X-%X-%X-%X"
	#define mac_3 hdr->addr3[0],hdr->addr3[1],hdr->addr3[2],hdr->addr3[3],hdr->addr3[4],hdr->addr3[5]
   printk(KERN_DEBUG "ieee80211_rx(): From:"macaddr__stm" arpcheck(08-06):%X-%X\n",
		 mac_3, skb->data[38], skb->data[39]
	  );
	/*.....*/
}

skb->data[38] and skb->data[39] will represent the LLC type field and 0x0806 defines ARP type in ARP-Packages on a 802.11s Meshnetwork.

Reading the Kernellog I noticed that ARP frames weren't passed to ieee80211_rx().
I monitored the WLAN channel with wireshark and compare the frames apperaing with my Kernellog.
Byte 56 and 57 (Left block, 4th Line of the wireshark hex output)  matches to skb->data[38], skb->data[39].

Nearly every frame appearing in Wireshark was also visible in the Kernellog. Even frames of other wirless networks.
MAC_3 (perprocessordefinition, see above) was matching to the "bssi" field in wireshark. skb->data[38], skb->data[39] where matching to byte 56 and 57.
There where two frame types I saw only on Wireshark but not in the Kernelog.
One was a becon of a Sitecom router the other one where my 802.11s ARP Frames.

So I edited in  "drivers/net/wireless/ath/ath9k/" "recv.c" and "main.c"
First I insert the printk statement in ath9k_tasklet() and ath_rx_tasklet().
Every frame appearing in ath9k_tasklet() where passed to  ath_rx_tasklet() and ieee80211_rx().
Dropping the frame must happend somewere before ath9k_tasklet() is called.
Then I  insert a printk() statement in  ath_isr() saying "ath_isr() called".
I noticed that not every interupt causes a ath9k_tasklet() call.

Perhaps here my frames are droped. I would be nice if I would be able to access the frame content in ath_isr(). But I don't know how?
Can some one tellme how to access the framedata in order to add a statement like this:
    printk(KERN_DEBUG "ath_isr(): From:"macaddr__stm" arpcheck(08-06):%X-%X\n", ...);
So I can follow and will be able to see where exactly the frames are droped.

By the way. Look at http://is.gd/zqQirl .
For me line 20 has no sens because "changed_flags" is never used.


Cheers,
Tom


p.s.: I'm completly new to kernel/driver development. So pleaes explain every thing in details.

                 reply	other threads:[~2012-07-29 16:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9811600.PToINpAW92@buri \
    --to=thomas.wagner@hs-rm.de \
    --cc=ath9k-devel@lists.ath9k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox