Patchwork [1/3] Support not specifying the frame frequency.

login
register
mail settings
Submitter Antonio Quartulli
Date June 19, 2013, 8:11 p.m.
Message ID <1371672694-1194-2-git-send-email-ordex@autistici.org>
Download mbox | patch
Permalink /patch/252649/
State Superseded
Headers show

Comments

Antonio Quartulli - June 19, 2013, 8:11 p.m.
From: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>

If the frequency is not specified the frame is now sent over
the channel used by the current BSS.

This will also log each sent CMD_FRAME.

Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
[antonio@open-mesh.com: commit message reworded]
Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
---
 src/drivers/driver_nl80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e1e27ea..34c975d 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8791,10 +8791,12 @@  static int nl80211_send_frame_cmd(struct i802_bss *bss,
 	wpa_printf(MSG_MSGDUMP, "nl80211: CMD_FRAME freq=%u wait=%u no_cck=%d "
 		   "no_ack=%d offchanok=%d",
 		   freq, wait, no_cck, no_ack, offchanok);
+	wpa_hexdump(MSG_DEBUG, "CMD_FRAME", buf, buf_len);
 	nl80211_cmd(drv, msg, 0, NL80211_CMD_FRAME);
 
 	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
-	NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
+	if (freq)
+		NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
 	if (wait)
 		NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait);
 	if (offchanok && (drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX))