]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ieee80211: allow mtu bigger than 1500
authormatthieu castet <castet.matthieu@free.fr>
Thu, 28 Sep 2006 17:57:25 +0000 (19:57 +0200)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 05:11:57 +0000 (00:11 -0500)
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>
net/ieee80211/ieee80211_module.c

index 13b1e5fff7e4741de39c232ba35931ef84129b92..2b14c2f3e21d89330a36d45dffc51f9358e3a949 100644 (file)
@@ -118,6 +118,14 @@ static void ieee80211_networks_initialize(struct ieee80211_device *ieee)
                              &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 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
        }
        ieee = netdev_priv(dev);
        dev->hard_start_xmit = ieee80211_xmit;
+       dev->change_mtu = ieee80211_change_mtu;
 
        ieee->dev = dev;