staging: rtl8192e: Replace struct rtllib_hdr_1addr with ieee80211_hdr

Replace struct rtllib_hdr_1addr with struct ieee80211_hdr to avoid
proprietary struct.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/84aa25fec8e29199970df37b1671f0252d12374e.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Philipp Hortmann
2023-09-15 18:06:46 +02:00
committed by Greg Kroah-Hartman
parent 58806573a7
commit 2af6ed8d4f
3 changed files with 5 additions and 12 deletions

View File

@@ -1470,7 +1470,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb +
MAX_DEV_ADDR_SIZE);
struct tx_desc *pdesc = NULL;
struct rtllib_hdr_1addr *header = NULL;
struct ieee80211_hdr *header = NULL;
u8 *pda_addr = NULL;
int idx;
u32 fwinfo_size = 0;
@@ -1479,7 +1479,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size);
header = (struct ieee80211_hdr *)(((u8 *)skb->data) + fwinfo_size);
pda_addr = header->addr1;
if (!is_broadcast_ether_addr(pda_addr) && !is_multicast_ether_addr(pda_addr))
@@ -1725,7 +1725,7 @@ void rtl92e_copy_mpdu_stats(struct rtllib_rx_stats *psrc_stats,
static void _rtl92e_rx_normal(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_hdr_1addr *rtllib_hdr = NULL;
struct ieee80211_hdr *rtllib_hdr = NULL;
bool unicast_packet = false;
u32 skb_len = 0;
int rx_queue_idx = RX_MPDU_QUEUE;
@@ -1764,7 +1764,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
skb_reserve(skb, stats.RxDrvInfoSize +
stats.RxBufShift);
skb_trim(skb, skb->len - S_CRC_LEN);
rtllib_hdr = (struct rtllib_hdr_1addr *)skb->data;
rtllib_hdr = (struct ieee80211_hdr *)skb->data;
if (!is_multicast_ether_addr(rtllib_hdr->addr1)) {
/* unicast packet */
unicast_packet = true;

View File

@@ -685,13 +685,6 @@ struct rtllib_hdr {
u8 payload[];
} __packed;
struct rtllib_hdr_1addr {
__le16 frame_ctl;
__le16 duration_id;
u8 addr1[ETH_ALEN];
u8 payload[];
} __packed;
struct rtllib_hdr_3addr {
__le16 frame_ctl;
__le16 duration_id;

View File

@@ -268,7 +268,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct tx_ts_record *pTxTs = NULL;
struct rtllib_hdr_1addr *hdr = (struct rtllib_hdr_1addr *)skb->data;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
if (rtllib_act_scanning(ieee, false))
return;