summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorSara Sharon2016-10-18 22:12:11 +0200
committerJohannes Berg2016-10-19 12:12:44 +0200
commitf3fe4e93dd6346c01fd4070ae02ec746fbae73bb (patch)
tree3ab6bd9fe32aec5bbc380a6a3ba250069b1131a1 /net/mac80211/main.c
parentmac80211: allow the driver not to pass the tid to ieee80211_sta_uapsd_trigger (diff)
downloadkernel-qcow2-linux-f3fe4e93dd6346c01fd4070ae02ec746fbae73bb.tar.gz
kernel-qcow2-linux-f3fe4e93dd6346c01fd4070ae02ec746fbae73bb.tar.xz
kernel-qcow2-linux-f3fe4e93dd6346c01fd4070ae02ec746fbae73bb.zip
mac80211: add a HW flag for supporting HW TX fragmentation
Currently mac80211 determines whether HW does fragmentation by checking whether the set_frag_threshold callback is set or not. However, some drivers may want to set the HW fragmentation capability depending on HW generation. Allow this by checking a HW flag instead of checking the callback. Signed-off-by: Sara Sharon <sara.sharon@intel.com> [added the flag to ath10k and wlcore] Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 1075ac24c8c5..0d9163c16dda 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -821,6 +821,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
!local->ops->tdls_recv_channel_switch))
return -EOPNOTSUPP;
+ if (WARN_ON(ieee80211_hw_check(hw, SUPPORTS_TX_FRAG) &&
+ !local->ops->set_frag_threshold))
+ return -EINVAL;
+
if (WARN_ON(local->hw.wiphy->interface_modes &
BIT(NL80211_IFTYPE_NAN) &&
(!local->ops->start_nan || !local->ops->stop_nan)))