No need for this silly abstraction. Also rename
the structure member so it makes more sense when
used.
Signed-off-by: Michal Kazior michal.kaz...@tieto.com
---
drivers/net/wireless/ath/ath10k/core.c |6 ++
drivers/net/wireless/ath/ath10k/core.h |7 +--
drivers/net/wireless/ath/ath10k/mac.c | 11 +--
drivers/net/wireless/ath/ath10k/wmi.c |3 +--
4 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c
b/drivers/net/wireless/ath/ath10k/core.c
index 564a39f..2b3426b 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -445,15 +445,13 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct
device *dev,
const struct ath10k_hif_ops *hif_ops)
{
struct ath10k *ar;
- struct ath_common *common;
ar = ath10k_mac_create();
if (!ar)
return NULL;
- common = ath10k_common(ar);
- common-priv = ar;
- common-hw = ar-hw;
+ ar-ath_common.priv = ar;
+ ar-ath_common.hw = ar-hw;
ar-p2p = !!ath10k_p2p;
ar-dev = dev;
diff --git a/drivers/net/wireless/ath/ath10k/core.h
b/drivers/net/wireless/ath/ath10k/core.h
index 6c681cf..39cee58 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -250,7 +250,7 @@ struct ath10k_debug {
};
struct ath10k {
- struct ath_common common;
+ struct ath_common ath_common;
struct ieee80211_hw *hw;
struct device *dev;
u8 mac_addr[ETH_ALEN];
@@ -354,11 +354,6 @@ struct ath10k {
#endif
};
-static inline struct ath_common *ath10k_common(struct ath10k *ar)
-{
- return ar-common;
-}
-
struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
enum ath10k_bus bus,
const struct ath10k_hif_ops *hif_ops);
diff --git a/drivers/net/wireless/ath/ath10k/mac.c
b/drivers/net/wireless/ath/ath10k/mac.c
index bf7954b..14e7ada 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1185,7 +1185,7 @@ static void ath10k_reg_notifier(struct wiphy *wiphy,
struct ath10k *ar = hw-priv;
int ret;
- ath_reg_notifier_apply(wiphy, request, ath10k_common(ar)-regulatory);
+ ath_reg_notifier_apply(wiphy, request, ar-ath_common.regulatory);
ret = ath10k_update_channel_list(ar);
if (ret)
@@ -2741,7 +2741,6 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar,
u32 vdev_id)
int ath10k_mac_register(struct ath10k *ar)
{
- struct ath_common *common = ath10k_common(ar);
struct ieee80211_supported_band *band;
struct ieee80211_sta_ht_cap ht_cap;
void *channels;
@@ -2835,8 +2834,8 @@ int ath10k_mac_register(struct ath10k *ar)
ar-hw-wiphy-iface_combinations = ath10k_if_comb;
ar-hw-wiphy-n_iface_combinations = 1;
- common-regulatory.country_code = CTRY_DEFAULT;
- ret = ath_regd_init(common-regulatory, ar-hw-wiphy,
+ ar-ath_common.regulatory.country_code = CTRY_DEFAULT;
+ ret = ath_regd_init(ar-ath_common.regulatory, ar-hw-wiphy,
ath10k_reg_notifier);
if (ret) {
ath10k_err(Regulatory initialization failed\n);
@@ -2849,9 +2848,9 @@ int ath10k_mac_register(struct ath10k *ar)
return ret;
}
- if (!ath_is_world_regd(common-regulatory)) {
+ if (!ath_is_world_regd(ar-ath_common.regulatory)) {
ret = regulatory_hint(ar-hw-wiphy,
- common-regulatory.alpha2);
+ ar-ath_common.regulatory.alpha2);
if (ret)
goto exit;
}
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c
b/drivers/net/wireless/ath/ath10k/wmi.c
index d2d712d..e2f8ff9 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -853,7 +853,6 @@ static void
ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
struct sk_buff *skb)
{
- struct ath_common *common = ath10k_common(ar);
struct wmi_service_ready_event *ev = (void *)skb-data;
if (skb-len sizeof(*ev)) {
@@ -874,7 +873,7 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k
*ar,
ar-fw_version_build = (__le32_to_cpu(ev-sw_version_1) 0x);
ar-phy_capability = __le32_to_cpu(ev-phy_capability);
- common-regulatory.current_rd =
+ ar-ath_common.regulatory.current_rd =
__le32_to_cpu(ev-hal_reg_capabilities.eeprom_rd);
ath10k_debug_read_service_map(ar, ev-wmi_service_bitmap,
--
1.7.9.5
___
ath9k-devel mailing list