mac80211_hwsim: enable TODS BIT in null data frame
authorAdiel Aloni <adiel.aloni@intel.com>
Mon, 18 Dec 2017 10:14:04 +0000 (12:14 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 19 Dec 2017 08:13:00 +0000 (09:13 +0100)
Same as in ieee80211_nullfunc_get, enable the TODS bit, otherwise the
nullfunc packet will not be handled in ap rx path.
(will be dropped in ieee80211_accept_frame()).

Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 10b075a46b266218c53d1e5674c1789e1e0f3d80..59b0cedcdf7b7aafd59325df4fed9d443599420b 100644 (file)
@@ -684,6 +684,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
        hdr = skb_put(skb, sizeof(*hdr) - ETH_ALEN);
        hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
                                         IEEE80211_STYPE_NULLFUNC |
+                                        IEEE80211_FCTL_TODS |
                                         (ps ? IEEE80211_FCTL_PM : 0));
        hdr->duration_id = cpu_to_le16(0);
        memcpy(hdr->addr1, vp->bssid, ETH_ALEN);