ath10k: more fixes
cover ath10k: more fixes
This is part 2 of 4 of a bigger patchset.
Split for easier review.
Contains non-functional fixes.
Note: it is not based on master branch.
Michal Kazior (7):
ath10k: remove ath10k_bus
ath10k: fix typo in define name
ath10k: silent warning in IBSS mode
ath10k: lower print level for a message
ath10k: provide errno if bmi read/write fails
ath10k: change function to take struct ath10k as arg
ath10k: rename hif callback
drivers/net/wireless/ath/ath10k/bmi.c | 6 ++++-- drivers/net/wireless/ath/ath10k/ce.c | 2 +- drivers/net/wireless/ath/ath10k/core.c | 2 -- drivers/net/wireless/ath/ath10k/core.h | 6 ------ drivers/net/wireless/ath/ath10k/hif.h | 10 +++++----- drivers/net/wireless/ath/ath10k/htc.c | 7 ++++--- drivers/net/wireless/ath/ath10k/pci.c | 21 ++++++++++----------- drivers/net/wireless/ath/ath10k/pci.h | 4 ++-- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 9 files changed, 28 insertions(+), 34 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/7 ath10k: remove ath10k_bus
It serves no purpose.
--- drivers/net/wireless/ath/ath10k/core.c | 2 -- drivers/net/wireless/ath/ath10k/core.h | 6 ------ drivers/net/wireless/ath/ath10k/pci.c | 3 +-- 3 files changed, 1 insertion(+), 10 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +0 -2
@@ -441,7 +441,6 @@ static int ath10k_init_hw_params(struct ath10k *ar) }struct ath10k *ath10k_core_create (void *hif_priv,struct device *dev, -enum ath10k_bus bus,const struct ath10k_hif_ops *hif_ops) {struct ath10k *ar;
@@ -458,7 +457,6 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev, ar->hif.priv = hif_priv; ar->hif.ops = hif_ops; - ar->hif.bus = bus; ar->free_vdev_map =0xFF ;/* 8 vdevs */
drivers/net/wireless/ath/ath10k/core.h +0 -6
@@ -43,10 +43,6 @@struct ath10k ; -enum ath10k_bus { -ATH10K_BUS_PCI , -}; -struct ath10k_skb_cb {dma_addr_t paddr;bool is_mapped;
@@ -274,7 +270,6 @@ struct ath10k {struct {void *priv; -enum ath10k_bus bus;const struct ath10k_hif_ops *ops; } hif;
@@ -356,7 +351,6 @@ struct ath10k { };struct ath10k *ath10k_core_create (void *hif_priv,struct device *dev, -enum ath10k_bus bus,const struct ath10k_hif_ops *hif_ops);void ath10k_core_destroy (struct ath10k *ar);
drivers/net/wireless/ath/ath10k/pci.c +1 -2
@@ -2156,8 +2156,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,ath10k_pci_dump_features (ar_pci); - ar =ath10k_core_create (ar_pci, ar_pci->dev,ATH10K_BUS_PCI , - &ath10k_pci_hif_ops); + ar =ath10k_core_create (ar_pci, ar_pci->dev, &ath10k_pci_hif_ops);if (!ar) {ath10k_err ("ath10k_core_create failed!\n" ); ret = -EINVAL ;
Signature · 1 line
1.7.9.5
PATCH 2/7 ath10k: fix typo in define name
In reply to Michal Kazior--- drivers/net/wireless/ath/ath10k/ce.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 6 +++--- drivers/net/wireless/ath/ath10k/pci.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath10k/ce.c +1 -1
@@ -79,7 +79,7 @@ static inline void ath10k_ce_src_ring_write_index_set(struct ath10k *ar,struct ath10k_pci *ar_pci =ath10k_pci_priv (ar);void __iomem *indicator_addr; -if (!test_bit (ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND , ar_pci->features)) { +if (!test_bit (ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND , ar_pci->features)) {ath10k_pci_write32 (ar, ce_ctrl_addr +SR_WR_INDEX_ADDRESS , n);return ; }
drivers/net/wireless/ath/ath10k/pci.c +3 -3
@@ -2116,7 +2116,7 @@ static void ath10k_pci_dump_features(struct ath10k_pci *ar_pci)case ATH10K_PCI_FEATURE_MSI_X :ath10k_dbg (ATH10K_DBG_PCI ,"device supports MSI-X\n" );break ; -case ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND : +case ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND :ath10k_dbg (ATH10K_DBG_PCI ,"QCA988X_1.0 workaround enabled\n" );break ; }
@@ -2143,7 +2143,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,switch (pci_dev->device) {case QCA988X_1_0_DEVICE_ID : -set_bit (ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND , ar_pci->features); +set_bit (ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND , ar_pci->features);break ;case QCA988X_2_0_DEVICE_ID :set_bit (ATH10K_PCI_FEATURE_MSI_X , ar_pci->features);
@@ -2164,7 +2164,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, }/* Enable QCA988X_1.0 HW workarounds */ -if (test_bit (ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND , ar_pci->features)) +if (test_bit (ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND , ar_pci->features))spin_lock_init (&ar_pci->hw_v1_workaround_lock); ar_pci->ar = ar;
drivers/net/wireless/ath/ath10k/pci.h +2 -2
@@ -152,7 +152,7 @@ struct service_to_pipe {enum ath10k_pci_features {ATH10K_PCI_FEATURE_MSI_X =0 , -ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND =1 , +ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND =1 ,/* keep last */ ATH10K_PCI_FEATURE_COUNT
@@ -311,7 +311,7 @@ static inline void ath10k_pci_write32(struct ath10k *ar, u32 offset,struct ath10k_pci *ar_pci =ath10k_pci_priv (ar);void __iomem *addr = ar_pci->mem; -if (test_bit (ATH10K_PCI_FEATURE_HW_1_0_WARKAROUND , ar_pci->features)) { +if (test_bit (ATH10K_PCI_FEATURE_HW_1_0_WORKAROUND , ar_pci->features)) {unsigned long irq_flags;spin_lock_irqsave (&ar_pci->hw_v1_workaround_lock, irq_flags);
Signature · 1 line
1.7.9.5
PATCH 3/7 ath10k: silent warning in IBSS mode
In reply to Michal KaziorThere is no TIM IE generated in IBSS beacons by
mac80211.
--- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.c +2 -2
@@ -501,8 +501,8 @@ static void ath10k_wmi_update_tim(struct ath10k *ar, ie = (u8 *)cfg80211_find_ie (WLAN_EID_TIM , ies, (u8 *)skb_tail_pointer (bcn) - ies);if (!ie) { -/* highly unlikely for mac80211 */ -ath10k_warn ("no tim ie found;\n" ); +if (arvif->vdev_type !=WMI_VDEV_TYPE_IBSS ) +ath10k_warn ("no tim ie found;\n" );return ; }
Signature · 1 line
1.7.9.5
PATCH 4/7 ath10k: lower print level for a message
In reply to Michal Kazior--- drivers/net/wireless/ath/ath10k/htc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/htc.c +3 -2
@@ -751,8 +751,9 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc, tx_alloc =ath10k_htc_get_credit_allocation (htc, conn_req->service_id);if (!tx_alloc) -ath10k_warn ("HTC Service %s does not allocate target credits\n" , -htc_service_name (conn_req->service_id)); +ath10k_dbg (ATH10K_DBG_HTC , +"HTC Service %s does not allocate target credits\n" , +htc_service_name (conn_req->service_id)); skb =ath10k_htc_build_tx_ctrl_skb (htc->ar);if (!skb) {
Signature · 1 line
1.7.9.5
PATCH 5/7 ath10k: provide errno if bmi read/write fails
In reply to Michal Kazior--- drivers/net/wireless/ath/ath10k/bmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/bmi.c +4 -2
@@ -105,7 +105,8 @@ int ath10k_bmi_read_memory(struct ath10k *ar, ret =ath10k_hif_exchange_bmi_msg (ar, &cmd, cmdlen, &resp, &rxlen);if (ret) { -ath10k_warn ("unable to read from the device\n" ); +ath10k_warn ("unable to read from the device (%d)\n" , + ret);return ret; }
@@ -149,7 +150,8 @@ int ath10k_bmi_write_memory(struct ath10k *ar, ret =ath10k_hif_exchange_bmi_msg (ar, &cmd, hdrlen + txlen,NULL ,NULL );if (ret) { -ath10k_warn ("unable to write to the device\n" ); +ath10k_warn ("unable to write to the device (%d)\n" , + ret);return ret; }
Signature · 1 line
1.7.9.5
PATCH 6/7 ath10k: change function to take struct ath10k as arg
In reply to Michal KaziorThis aligns it to the argument list of other
similar functions.
--- drivers/net/wireless/ath/ath10k/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +3 -3
@@ -2057,9 +2057,9 @@ static int ath10k_pci_reset_target(struct ath10k *ar)return 0 ; } -static void ath10k_pci_device_reset (struct ath10k_pci *ar_pci) +static void ath10k_pci_device_reset (struct ath10k *ar) { -struct ath10k *ar = ar_pci->ar; +struct ath10k_pci *ar_pci =ath10k_pci_priv (ar);void __iomem *mem = ar_pci->mem;int i;u32 val;
@@ -2254,7 +2254,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,* is in an unexpected state. We try to catch that here in order to * reset the Target and retry the probe. */ -ath10k_pci_device_reset (ar_pci); +ath10k_pci_device_reset (ar); ret =ath10k_pci_reset_target (ar);if (ret)
Signature · 1 line
1.7.9.5
PATCH 7/7 ath10k: rename hif callback
In reply to Michal KaziorThe set_callbacks is a more appopriate name for
the function. Let's leave init for something
else.
--- drivers/net/wireless/ath/ath10k/hif.h | 10 +++++----- drivers/net/wireless/ath/ath10k/htc.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath10k/hif.h +5 -5
@@ -66,8 +66,8 @@ struct ath10k_hif_ops {*/ void (*send_complete_check)(struct ath10k *ar,u8 pipe_id,int force); -void (*init)(struct ath10k *ar, -struct ath10k_hif_cb *callbacks); +void (*set_callbacks)(struct ath10k *ar, +struct ath10k_hif_cb *callbacks);u16 (*get_free_queue_number)(struct ath10k *ar,u8 pipe_id); };
@@ -122,10 +122,10 @@ static inline void ath10k_hif_send_complete_check(struct ath10k *ar, ar->hif.ops->send_complete_check (ar, pipe_id, force); } -static inline void ath10k_hif_init (struct ath10k *ar, -struct ath10k_hif_cb *callbacks) +static inline void ath10k_hif_set_callbacks (struct ath10k *ar, +struct ath10k_hif_cb *callbacks) { - ar->hif.ops->init (ar, callbacks); + ar->hif.ops->set_callbacks (ar, callbacks); } static inline u16 ath10k_hif_get_free_queue_number(struct ath10k *ar,
drivers/net/wireless/ath/ath10k/htc.c +1 -1
@@ -987,7 +987,7 @@ struct ath10k_htc *ath10k_htc_create(struct ath10k *ar,/* Get HIF default pipe for HTC message exchange */ ep = &htc->endpoint[ATH10K_HTC_EP_0 ]; -ath10k_hif_init (ar, &htc_callbacks); +ath10k_hif_set_callbacks (ar, &htc_callbacks);ath10k_hif_get_default_pipe (ar, &ep->ul_pipe_id, &ep->dl_pipe_id);init_completion (&htc->ctl_resp);
drivers/net/wireless/ath/ath10k/pci.c +3 -3
@@ -744,8 +744,8 @@ static void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe,ath10k_ce_per_engine_service (ar, pipe); } -static void ath10k_pci_hif_post_init (struct ath10k *ar, -struct ath10k_hif_cb *callbacks) +static void ath10k_pci_hif_set_callbacks (struct ath10k *ar, +struct ath10k_hif_cb *callbacks) {struct ath10k_pci *ar_pci =ath10k_pci_priv (ar);
@@ -1742,7 +1742,7 @@ static const struct ath10k_hif_ops ath10k_pci_hif_ops = { .map_service_to_pipe = ath10k_pci_hif_map_service_to_pipe, .get_default_pipe = ath10k_pci_hif_get_default_pipe, .send_complete_check = ath10k_pci_hif_send_complete_check, - .init = ath10k_pci_hif_post_init, + .set_callbacks = ath10k_pci_hif_set_callbacks, .get_free_queue_number = ath10k_pci_hif_get_free_queue_number, };
Signature · 1 line
1.7.9.5
cover ath10k: more fixes
In reply to Michal KaziorQuoted 16 lines · Michal Kazior
This is part 2 of 4 of a bigger patchset.
Split for easier review.Contains non-functional fixes.
Note: it is not based on master branch.
Michal Kazior (7):
ath10k: removeath10k_bus
ath10k: fix typo in define name
ath10k: silent warning in IBSS mode
ath10k: lower print level for a message
ath10k: provide errno if bmi read/write fails
ath10k: change function to take struct ath10k as arg
ath10k: rename hif callback
Quoted 10 lines
drivers/net/wireless/ath/ath10k/bmi.c | 6 ++++-- drivers/net/wireless/ath/ath10k/ce.c | 2 +- drivers/net/wireless/ath/ath10k/core.c | 2 -- drivers/net/wireless/ath/ath10k/core.h | 6 ------ drivers/net/wireless/ath/ath10k/hif.h | 10 +++++----- drivers/net/wireless/ath/ath10k/htc.c | 7 ++++--- drivers/net/wireless/ath/ath10k/pci.c | 21 ++++++++++----------- drivers/net/wireless/ath/ath10k/pci.h | 4 ++-- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 9 files changed, 28 insertions(+), 34 deletions(-)
Looks good to me.
Sujith
cover ath10k: more fixes
In reply to Michal KaziorQuoted 7 lines · Michal Kazior
This is part 2 of 4 of a bigger patchset.
Split for easier review.Contains non-functional fixes.
Note: it is not based on master branch.
Quoted 8 lines
Michal Kazior (7):
ath10k: removeath10k_bus
ath10k: fix typo in define name
ath10k: silent warning in IBSS mode
ath10k: lower print level for a message
ath10k: provide errno if bmi read/write fails
ath10k: change function to take struct ath10k as arg
ath10k: rename hif callback
Thanks, all applied.
Signature · 1 line
Kalle Valo