mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
LinuxKPI: 802.11: implement ieee80211_probereq_get()
Implement ieee80211_probereq_get() needed by Realtek drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
349b042b90
commit
ade774b19f
2 changed files with 40 additions and 3 deletions
|
|
@ -905,6 +905,8 @@ void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *, unsigned long *,
|
|||
struct wireless_dev *linuxkpi_ieee80211_vif_to_wdev(struct ieee80211_vif *);
|
||||
void linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *);
|
||||
void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *);
|
||||
struct sk_buff *linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *,
|
||||
uint8_t *, uint8_t *, size_t, size_t);
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
|
@ -1868,10 +1870,11 @@ ieee80211_nullfunc_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|||
|
||||
static __inline struct sk_buff *
|
||||
ieee80211_probereq_get(struct ieee80211_hw *hw, uint8_t *addr,
|
||||
uint8_t *ssid, size_t ssid_len, int _x)
|
||||
uint8_t *ssid, size_t ssid_len, size_t tailroom)
|
||||
{
|
||||
TODO();
|
||||
return (NULL);
|
||||
|
||||
return (linuxkpi_ieee80211_probereq_get(hw, addr, ssid, ssid_len,
|
||||
tailroom));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
|
|
|
|||
|
|
@ -4116,6 +4116,40 @@ linuxkpi_ieee80211_queue_work(struct ieee80211_hw *hw,
|
|||
queue_work(lhw->workq, w);
|
||||
}
|
||||
|
||||
struct sk_buff *
|
||||
linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *hw, uint8_t *addr,
|
||||
uint8_t *ssid, size_t ssid_len, size_t tailroom)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct ieee80211_frame *wh;
|
||||
uint8_t *p;
|
||||
size_t len;
|
||||
|
||||
len = sizeof(*wh);
|
||||
len += 2 + ssid_len;
|
||||
|
||||
skb = dev_alloc_skb(hw->extra_tx_headroom + len + tailroom);
|
||||
if (skb == NULL)
|
||||
return (NULL);
|
||||
|
||||
skb_reserve(skb, hw->extra_tx_headroom);
|
||||
|
||||
wh = skb_put_zero(skb, sizeof(*wh));
|
||||
wh->i_fc[0] = IEEE80211_FC0_VERSION_0;
|
||||
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_PROBE_REQ | IEEE80211_FC0_TYPE_MGT;
|
||||
IEEE80211_ADDR_COPY(wh->i_addr1, ieee80211broadcastaddr);
|
||||
IEEE80211_ADDR_COPY(wh->i_addr2, addr);
|
||||
IEEE80211_ADDR_COPY(wh->i_addr3, ieee80211broadcastaddr);
|
||||
|
||||
p = skb_put(skb, 2 + ssid_len);
|
||||
*p++ = IEEE80211_ELEMID_SSID;
|
||||
*p++ = ssid_len;
|
||||
if (ssid_len > 0)
|
||||
memcpy(p, ssid, ssid_len);
|
||||
|
||||
return (skb);
|
||||
}
|
||||
|
||||
struct sk_buff *
|
||||
linuxkpi_ieee80211_pspoll_get(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
|
|
|
|||
Loading…
Reference in a new issue