/* TODO: only support linux for now */ void wlan_offchan_send_data_frame(struct ieee80211_node *ni, struct net_device *netdev) { #if defined(LINUX) || defined(__linux__) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; wbuf_t wbuf; struct ieee80211_qosframe *qwh; const u_int8_t dst[6] = {0x00, 0x02, 0x03, 0x04, 0x05, 0x06}; struct sk_buff *skb; wbuf = wbuf_alloc(ic->ic_osdev, WBUF_TX_DATA, 1000); if (wbuf == NULL) { return ; } ieee80211_prepare_qosnulldata(ni, wbuf, WME_AC_VO); qwh = (struct ieee80211_qosframe *)wbuf_header(wbuf); ieee80211_send_setup(vap, ni, (struct ieee80211_frame *)qwh, IEEE80211_FC0_TYPE_DATA, vap->iv_myaddr, /* SA */ dst, /* DA */ ni->ni_bssid); wbuf_set_pktlen(wbuf, 1000); /* force with NONPAUSE_TID */ wbuf_set_tid(wbuf, OFFCHAN_EXT_TID_NONPAUSE); skb = (struct sk_buff *)wbuf; skb->dev = netdev; dev_queue_xmit(skb); #endif }
wbuf_t ath_net80211_uapsd_getqosnullframe(ieee80211_node_t node, wbuf_t wbuf, int ac) { struct ieee80211_node *ni; ni = (struct ieee80211_node *)node; ieee80211_prepare_qosnulldata(ni, wbuf, ac); /* Add a refcnt to the node so that it remains until this QosNull frame completion in ath_net80211_uapsd_retqosnullframe() */ ieee80211_ref_node(ni); return wbuf; }