Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: remove fragmentation offload functionality

There's no driver that actually does fragmentation on the
device, and the callback is buggy (when it returns an error,
mac80211's fragmentation status is changed so reading the
frag threshold from userspace reads the new value despite
the error). Let's just remove it, if we really find some
hardware supporting it we can add it back later.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Johannes Berg and committed by
John W. Linville
f546638c e4f2a345

-14
-5
include/net/mac80211.h
··· 1258 1258 * 1259 1259 * @set_rts_threshold: Configuration of RTS threshold (if device needs it) 1260 1260 * 1261 - * @set_frag_threshold: Configuration of fragmentation threshold. Assign this if 1262 - * the device does fragmentation by itself; if this method is assigned then 1263 - * the stack will not do fragmentation. 1264 - * 1265 1261 * @sta_notify: Notifies low level driver about addition or removal of an 1266 1262 * associated station, AP, IBSS/WDS/mesh peer etc. Must be atomic. 1267 1263 * ··· 1327 1331 void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, 1328 1332 u32 *iv32, u16 *iv16); 1329 1333 int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); 1330 - int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); 1331 1334 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1332 1335 enum sta_notify_cmd, struct ieee80211_sta *sta); 1333 1336 void (*sta_notify_ps)(struct ieee80211_hw *hw,
-1
net/mac80211/tx.c
··· 1001 1001 if (tx->flags & IEEE80211_TX_FRAGMENTED) { 1002 1002 if ((tx->flags & IEEE80211_TX_UNICAST) && 1003 1003 skb->len + FCS_LEN > local->fragmentation_threshold && 1004 - !local->ops->set_frag_threshold && 1005 1004 !(info->flags & IEEE80211_TX_CTL_AMPDU)) 1006 1005 tx->flags |= IEEE80211_TX_FRAGMENTED; 1007 1006 else
-8
net/mac80211/wext.c
··· 639 639 local->fragmentation_threshold = frag->value & ~0x1; 640 640 } 641 641 642 - /* If the wlan card performs fragmentation in hardware/firmware, 643 - * configure it here */ 644 - 645 - if (local->ops->set_frag_threshold) 646 - return local->ops->set_frag_threshold( 647 - local_to_hw(local), 648 - local->fragmentation_threshold); 649 - 650 642 return 0; 651 643 } 652 644