[WIP,1/2] Support not specifying the frame frequency.

Message ID 1365414953-25734-2-git-send-email-cavallar@lri.fr
State Superseded
Headers show

Commit Message

Nicolas Cavallari April 8, 2013, 9:55 a.m.
By default, the frame is sent to the current BSS.  This requires patches
to the kernel through, which have not been integrated yet.

This will also log each sent CMD_FRAME.

Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
 src/drivers/driver_nl80211.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b53e706..a932b8d 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8622,10 +8622,12 @@  static int nl80211_send_frame_cmd(struct i802_bss *bss,
 	wpa_printf(MSG_DEBUG, "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))