nl80211: Support not specifying the frame frequency

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

This will also log the payload of 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>
This commit is contained in:
Nicolas Cavallari 2013-07-21 15:24:50 +03:00 committed by Jouni Malinen
parent ec384c566a
commit c91f796fb4

View file

@ -9200,11 +9200,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 " wpa_printf(MSG_MSGDUMP, "nl80211: CMD_FRAME freq=%u wait=%u no_cck=%d "
"no_ack=%d offchanok=%d", "no_ack=%d offchanok=%d",
freq, wait, no_cck, no_ack, offchanok); freq, wait, no_cck, no_ack, offchanok);
wpa_hexdump(MSG_MSGDUMP, "CMD_FRAME", buf, buf_len);
nl80211_cmd(drv, msg, 0, NL80211_CMD_FRAME); nl80211_cmd(drv, msg, 0, NL80211_CMD_FRAME);
if (nl80211_set_iface_id(msg, bss) < 0) if (nl80211_set_iface_id(msg, bss) < 0)
goto nla_put_failure; goto nla_put_failure;
if (freq)
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq); NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
if (wait) if (wait)
NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait); NLA_PUT_U32(msg, NL80211_ATTR_DURATION, wait);