On Wed, 2019-09-04 at 14:15 +0800, Wen Gong wrote: > Make it possibly for drivers to adjust the default mat_mtu > by storing it in the hardware struct. > > +++ b/net/mac80211/iface.c > @@ -1877,7 +1877,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, > > /* MTU range: 256 - 2304 */ > ndev->min_mtu = 256; > - ndev->max_mtu = IEEE80211_MAX_DATA_LEN; > + if (local->hw.max_mtu) > + ndev->max_mtu = local->hw.max_mtu; > + else > + ndev->max_mtu = IEEE80211_MAX_DATA_LEN; It seems (slightly) preferable to me to just initialize the value in local->hw.max_mtu in alloc_hw(), so the driver can override it before register_hw(), and then use it here unconditionally. Any particular reason for it being this way? johannes