/* SPDX-License-Identifier: GPL-2.0 */
/*
* Portions of this file
* Copyright(c) 2016 Intel Deutschland GmbH
* Copyright (C) 2018 - 2019, 2021 Intel Corporation
*/
#ifndef __MAC80211_DRIVER_OPS
#define __MAC80211_DRIVER_OPS
#include <net/mac80211.h>
#include "ieee80211_i.h"
#include "trace.h"
#define check_sdata_in_driver(sdata) ({ \
!WARN_ONCE(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER), \
"%s: Failed check-sdata-in-driver check, flags: 0x%x\n", \
sdata->dev ? sdata->dev->name : sdata->name, sdata->flags); \
})
static inline struct ieee80211_sub_if_data *
get_bss_sdata(struct ieee80211_sub_if_data *sdata)
{
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
u.ap);
return sdata;
}
static inline void drv_tx(struct ieee80211_local *local,
struct ieee80211_tx_control *control,
struct sk_buff *skb)
{
local->ops->tx(&local->hw, control, skb);
}
static inline void drv_sync_rx_queues(struct ieee80211_local *local,
struct