From: Jouni Malinen Date: Tue, 9 Aug 2011 11:01:31 +0000 (+0300) Subject: nl80211: Do not include NL80211_ATTR_DURATION in TX frame if zero X-Git-Tag: hostap-1-bp~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db931ed6dd707e99bbc80416ed82cbfa27a01a2;p=thirdparty%2Fhostap.git 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. --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 42551c34c..37869b015 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);