nl80211: Do not include NL80211_ATTR_DURATION in TX frame if zero

When offloading of the offchannel TX wait is not used, it is better to
not include NL80211_ATTR_DURATION to avoid confusing nl80211/cfg80211.
This commit is contained in:
Jouni Malinen 2011-08-09 14:01:31 +03:00 committed by Jouni Malinen
parent a381f2a286
commit 9db931ed6d

View 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_IFINDEX, drv->ifindex);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq); 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_FLAG(msg, NL80211_ATTR_OFFCHANNEL_TX_OK);
NLA_PUT(msg, NL80211_ATTR_FRAME, buf_len, buf); NLA_PUT(msg, NL80211_ATTR_FRAME, buf_len, buf);