diff options
author | matthieu castet <castet.matthieu@free.fr> | 2006-09-28 13:57:25 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:11:57 -0500 |
commit | 42a4cf9576f036db69e15fa6b4e72986e17f0359 (patch) | |
tree | 4a6aad7749cbc2fe9626802a9723af945d1f6639 /net | |
parent | c9308b06c049a107edfbd4e5271771564eb6024d (diff) |
[PATCH] ieee80211: allow mtu bigger than 1500
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/ieee80211_module.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c index 13b1e5fff7e4..2b14c2f3e21d 100644 --- a/net/ieee80211/ieee80211_module.c +++ b/net/ieee80211/ieee80211_module.c | |||
@@ -118,6 +118,14 @@ static void ieee80211_networks_initialize(struct ieee80211_device *ieee) | |||
118 | &ieee->network_free_list); | 118 | &ieee->network_free_list); |
119 | } | 119 | } |
120 | 120 | ||
121 | static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) | ||
122 | { | ||
123 | if ((new_mtu < 68) || (new_mtu > IEEE80211_DATA_LEN)) | ||
124 | return -EINVAL; | ||
125 | dev->mtu = new_mtu; | ||
126 | return 0; | ||
127 | } | ||
128 | |||
121 | struct net_device *alloc_ieee80211(int sizeof_priv) | 129 | struct net_device *alloc_ieee80211(int sizeof_priv) |
122 | { | 130 | { |
123 | struct ieee80211_device *ieee; | 131 | struct ieee80211_device *ieee; |
@@ -133,6 +141,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv) | |||
133 | } | 141 | } |
134 | ieee = netdev_priv(dev); | 142 | ieee = netdev_priv(dev); |
135 | dev->hard_start_xmit = ieee80211_xmit; | 143 | dev->hard_start_xmit = ieee80211_xmit; |
144 | dev->change_mtu = ieee80211_change_mtu; | ||
136 | 145 | ||
137 | ieee->dev = dev; | 146 | ieee->dev = dev; |
138 | 147 | ||