mac80211: allow drivers to set max MTU

Make it possibly for drivers to adjust the default max_mtu
by storing it in the hardware struct and using that value
for all interfaces.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
Link: https://lore.kernel.org/r/1567738137-31748-1-git-send-email-wgong@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Wen Gong
2019-09-06 10:48:57 +08:00
committed by Johannes Berg
parent 24f6d765c8
commit 06354665f9
3 changed files with 5 additions and 1 deletions

View File

@@ -1876,7 +1876,7 @@ 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;
ndev->max_mtu = local->hw.max_mtu;
ret = register_netdevice(ndev);
if (ret) {