]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Do not include NL80211_ATTR_DURATION in TX frame if zero
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 9 Aug 2011 11:01:31 +0000 (14:01 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 9 Aug 2011 11:01:31 +0000 (14:01 +0300)
When offloading of the offchannel TX wait is not used, it is better to
not include NL80211_ATTR_DURATION to avoid confusing nl80211/cfg80211.

src/drivers/driver_nl80211.c

index 42551c34cac4b18a0be5e2ff2ce3bf6021c46afd..37869b015256206e272282dc27c932b1d995b93d 100644 (file)
@@ -6188,7 +6188,8 @@ static int nl80211_send_frame_cmd(struct wpa_driver_nl80211_data *drv,
 
        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
        NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
-       NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait);
+       if (wait)
+               NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait);
        NLA_PUT_FLAG(msg, NL80211_ATTR_OFFCHANNEL_TX_OK);
        NLA_PUT(msg, NL80211_ATTR_FRAME, buf_len, buf);