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 <[EMAIL PROTECTED]>
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;
 

Reply via email to