Search Linux Wireless

Re: [PATCH] wifi: ath9k_htc: limit MTU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chien Wong <m@xxxxxxxx> writes:

>>> Shouldn't this be the same as the extra_tx_headroom set above? Not sure
>>> what the +4 is for in that assignment, but it seems a bit odd to not be
>>> consistent. Did you verify that an MTU of 1580 works without crashing?
>>> 
>>> Maybe this should just be:
>>> 
>>> 	hw->max_mtu = MAX_USB_WLAN_TX_PIPE_MSG_SIZE - hw->extra_tx_headroom;
>>> 
>>> just to be sure?
>
> The +4 is for the header at the very beginning of the USB packet:
>  >/* hif_usb_send_mgmt() in hif_usb.c */
>  >	hdr = skb_push(skb, 4);
>  >	*hdr++ = cpu_to_le16(skb->len - 4);
>  >	*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
>
> I suppose that the four bytes are consumed by the USB hardware and they 
> do not occupy buffer in the firmware. And my experiment proved this.
> Unfortunately, setting MTU=1580 alone could not prevent the firmware 
> from crashing. The MTU only limits upper layer length, not taking MAC 
> overhead into account. That's why we need to take other measures such as
> dropping packets before sending via USB, as proposed by my earlier
> patch.

Well, we can also just take the upper layer overhead into account in the
MTU limit? Presumably there's a maximum MTU size that you can use
without the firmware crashing? So just set the MTU limit to that :)

-Toke




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux