* [PATH] Allow mtu bigger than 1500 for ieee80211
@ 2006-09-28 17:57 matthieu castet
2006-09-29 7:38 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: matthieu castet @ 2006-09-28 17:57 UTC (permalink / raw)
To: netdev; +Cc: linville
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
Hi
this patch allow to set the mtu between 1500 and 2304 (max octets in an
MSDU) for devices using ieee80211 linux stack.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
[-- Attachment #2: ieee80211mtu --]
[-- Type: text/plain, Size: 773 bytes --]
Index: linux/net/ieee80211/ieee80211_module.c
===================================================================
--- linux.orig/net/ieee80211/ieee80211_module.c 2006-09-26 19:27:26.000000000 +0200
+++ linux/net/ieee80211/ieee80211_module.c 2006-09-28 19:50:53.000000000 +0200
@@ -118,6 +118,14 @@
&ieee->network_free_list);
}
+static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
+
struct net_device *alloc_ieee80211(int sizeof_priv)
{
struct ieee80211_device *ieee;
@@ -133,6 +141,7 @@
}
ieee = netdev_priv(dev);
dev->hard_start_xmit = ieee80211_xmit;
+ dev->change_mtu = ieee80211_change_mtu;
ieee->dev = dev;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATH] Allow mtu bigger than 1500 for ieee80211
2006-09-28 17:57 [PATH] Allow mtu bigger than 1500 for ieee80211 matthieu castet
@ 2006-09-29 7:38 ` Johannes Berg
2006-09-29 9:30 ` Joerg Roedel
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2006-09-29 7:38 UTC (permalink / raw)
To: matthieu castet; +Cc: netdev, linville
On Thu, 2006-09-28 at 19:57 +0200, matthieu castet wrote:
> + if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN))
> + return -EINVAL;
What's with that lower limit, why 68?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATH] Allow mtu bigger than 1500 for ieee80211
2006-09-29 7:38 ` Johannes Berg
@ 2006-09-29 9:30 ` Joerg Roedel
2006-09-29 11:56 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Joerg Roedel @ 2006-09-29 9:30 UTC (permalink / raw)
To: Johannes Berg; +Cc: matthieu castet, netdev, linville
On Fri, Sep 29, 2006 at 09:38:21AM +0200, Johannes Berg wrote:
> On Thu, 2006-09-28 at 19:57 +0200, matthieu castet wrote:
>
> > + if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN))
> > + return -EINVAL;
>
> What's with that lower limit, why 68?
Isn't 68 the minimum MTU required by IPv4?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATH] Allow mtu bigger than 1500 for ieee80211
2006-09-29 9:30 ` Joerg Roedel
@ 2006-09-29 11:56 ` Johannes Berg
2006-09-29 15:47 ` Joerg Roedel
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2006-09-29 11:56 UTC (permalink / raw)
To: Joerg Roedel; +Cc: matthieu castet, netdev, linville
On Fri, 2006-09-29 at 11:30 +0200, Joerg Roedel wrote:
> On Fri, Sep 29, 2006 at 09:38:21AM +0200, Johannes Berg wrote:
> > On Thu, 2006-09-28 at 19:57 +0200, matthieu castet wrote:
> >
> > > + if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN))
> > > + return -EINVAL;
> >
> > What's with that lower limit, why 68?
>
> Isn't 68 the minimum MTU required by IPv4?
No idea, but shouldn't there be a named constant somewhere for that
then?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATH] Allow mtu bigger than 1500 for ieee80211
2006-09-29 11:56 ` Johannes Berg
@ 2006-09-29 15:47 ` Joerg Roedel
0 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2006-09-29 15:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: matthieu castet, netdev, linville
On Fri, Sep 29, 2006 at 01:56:10PM +0200, Johannes Berg wrote:
> On Fri, 2006-09-29 at 11:30 +0200, Joerg Roedel wrote:
> > Isn't 68 the minimum MTU required by IPv4?
>
> No idea, but shouldn't there be a named constant somewhere for that
> then?
Maybe. Other network drivers also implement this number as a hard value
in their change_mtu callback. For example, the default ethernet function
is implemented this way.
Joerg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-09-29 15:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-28 17:57 [PATH] Allow mtu bigger than 1500 for ieee80211 matthieu castet
2006-09-29 7:38 ` Johannes Berg
2006-09-29 9:30 ` Joerg Roedel
2006-09-29 11:56 ` Johannes Berg
2006-09-29 15:47 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).