qca / open-ath9k-htc-firmware

The firmware for QCA AR7010/AR9271 802.11n USB NICs
Other
430 stars 182 forks source link

Maximum MTU? #134

Open rodizio1 opened 7 years ago

rodizio1 commented 7 years ago

I've recently tried injecting frames in monitor mode with more than 1500bytes with Ar9271 cards on Kernel 4.9.35. Set interface MTU to 2300 with ifconfig. Anything higher than 1560 bytes payload (not sure right now how much that is with 802.11 header and fcs, I think something around 1600 or so, but I can look it up exactly if needed) makes something 'freeze'. From that point on, injecting frames is not possible anymore at all, also not with smaller sizes. Solved it by rebooting.

Doing the same with Ralink rt2800usb cards works up to 2270 bytes payload, so I assume it's not userspace, the kernel or it's network/mac stack, but something in the ath9k kernel drivers or ath9k firmware (?)

Have grepped the ath9k kernel drivers and firmware for 'mtu' quickly, couldn't find anything.

Does anybody know where to look or can give some hints?

erikarn commented 7 years ago

hi,

I think the firmware needs to be tweaked to allow larger frames, which means it'll be able to buffer less total numbers of frames.

-adrian

On 7 August 2017 at 11:43, Rodizio notifications@github.com wrote:

I've recently tried injecting frames in monitor mode with more than 1500bytes with Ar9271 cards on Kernel 4.9.35. Set interface MTU to 2300 with ifconfig. Anything higher than 1560 bytes payload (not sure right now how much that is with 802.11 header and fcs, I think something around 1600 or so, but I can look it up exactly if needed) makes something 'freeze'. From that point on, injecting frames is not possible anymore at all, also not with smaller sizes. Solved it by rebooting.

Doing the same with Ralink rt2800usb cards works up to 2270 bytes payload, so I assume it's not userspace, the kernel or it's network/mac stack, but something in the ath9k kernel drivers or ath9k firmware (?)

Have grepped the ath9k kernel drivers and firmware for 'mtu' quickly, couldn't find anything.

Does anybody know where to look or can give some hints?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qca/open-ath9k-htc-firmware/issues/134, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGl7Tj6pYS-N8Ami3o_Frwm_jKOT07Nks5sV1rpgaJpZM4OvzTb .

olerem commented 7 years ago

Can you please test if reducing size of MAX_TX_BUF_SIZE will prevent freezing. If yes, this will probably right field for research.

olerem commented 7 years ago

... on the drivers side. see hif_usb.* this controller has at least one known usb packet size related issue: https://github.com/qca/open-ath9k-htc-firmware/wiki/usb-related-issues (EP4 issue) I won't be surprised if there can be more.

rodizio1 commented 7 years ago

Thanks a lot, I'll give that a try (and also test on an Intel x86 machine to make sure it's not some strange Raspberry USB Problem).

rodizio1 commented 7 years ago

Gave it a quick test. 16384 makes the Pi crash completely, 28000 makes no difference as far as I can see.

olerem commented 7 years ago

What is the meaning of this numbers?

rodizio1 commented 7 years ago

The MAX_TX_BUF_SIZE in hif_usb.h.

rodrigowue commented 3 years ago

Hey @rodizio1 ,

Do you have any updates on this?

Cheers, Rodrigo