ath10k: embed ar_pci inside ar
Use the common convention of embedding private structures inside parent structures. This reduces allocations and simplifies pci probing code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:

committed by
Kalle Valo

parent
5c81c7fd62
commit
e7b541948b
@@ -4564,12 +4564,12 @@ static struct ieee80211_rate ath10k_rates[] = {
|
||||
#define ath10k_g_rates (ath10k_rates + 0)
|
||||
#define ath10k_g_rates_size (ARRAY_SIZE(ath10k_rates))
|
||||
|
||||
struct ath10k *ath10k_mac_create(void)
|
||||
struct ath10k *ath10k_mac_create(size_t priv_size)
|
||||
{
|
||||
struct ieee80211_hw *hw;
|
||||
struct ath10k *ar;
|
||||
|
||||
hw = ieee80211_alloc_hw(sizeof(struct ath10k), &ath10k_ops);
|
||||
hw = ieee80211_alloc_hw(sizeof(struct ath10k) + priv_size, &ath10k_ops);
|
||||
if (!hw)
|
||||
return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user