* [PATCH 1/8] ath11k: correct prefix for public functions in mac.c
@ 2019-06-24 11:49 Manikanta Pubbisetty
2019-06-24 11:49 ` [PATCH 2/8] ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static Manikanta Pubbisetty
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw)
To: ath11k; +Cc: Manikanta Pubbisetty
Use ath11k_mac_ prefix for all public functions defined
in mac.c file.
Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/core.c | 4 +--
drivers/net/wireless/ath/ath11k/debug.c | 2 +-
drivers/net/wireless/ath/ath11k/debug_htt_stats.c | 2 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
drivers/net/wireless/ath/ath11k/mac.c | 32 ++++++++++-----------
drivers/net/wireless/ath/ath11k/mac.h | 20 ++++++-------
drivers/net/wireless/ath/ath11k/wmi.c | 34 +++++++++++------------
7 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 74384b3..8fa18a7 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -577,7 +577,7 @@ void ath11k_core_halt(struct ath11k *ar)
ar->num_created_vdevs = 0;
- ath11k_scan_finish(ar);
+ ath11k_mac_scan_finish(ar);
ath11k_mac_peer_cleanup_all(ar);
cancel_delayed_work_sync(&ar->scan.timeout);
cancel_work_sync(&ar->regd_update_work);
@@ -606,7 +606,7 @@ static void ath11k_core_restart(struct work_struct *work)
continue;
ieee80211_stop_queues(ar->hw);
- ath11k_drain_tx(ar);
+ ath11k_mac_drain_tx(ar);
complete(&ar->scan.started);
complete(&ar->scan.completed);
complete(&ar->peer_assoc_done);
diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c
index f8081da..6aa260c 100644
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -191,7 +191,7 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, u8 *evt_buf, u32 len)
}
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, stats.pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, stats.pdev_id);
if (!ar) {
rcu_read_unlock();
ath11k_warn(ab, "failed to get ar for pdev_id %d: %d\n",
diff --git a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
index 66a5f2d..a9dffd1 100644
--- a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
+++ b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c
@@ -4296,7 +4296,7 @@ void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab,
pdev_id = FIELD_GET(HTT_STATS_COOKIE_LSB, cookie);
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, pdev_id);
rcu_read_unlock();
if (!ar) {
ath11k_warn(ab, "failed to get ar for pdev_id %d\n", pdev_id);
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index afe8399..3452e53 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -1247,7 +1247,7 @@ static int ath11k_htt_pull_ppdu_stats(struct ath11k_base *ab,
ppdu_id = msg->ppdu_id;
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, pdev_id);
if (!ar) {
ret = -EINVAL;
goto exit;
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 7a6c927..2e87b1a 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -345,7 +345,7 @@ static void ath11k_get_arvif_iter(void *data, u8 *mac,
arvif_iter->arvif = arvif;
}
-struct ath11k_vif *ath11k_get_arvif(struct ath11k *ar, u32 vdev_id)
+struct ath11k_vif *ath11k_mac_get_arvif(struct ath11k *ar, u32 vdev_id)
{
struct ath11k_vif_iter arvif_iter;
u32 flags;
@@ -364,8 +364,8 @@ struct ath11k_vif *ath11k_get_arvif(struct ath11k *ar, u32 vdev_id)
return arvif_iter.arvif;
}
-struct ath11k_vif *ath11k_get_arvif_by_vdev_id(struct ath11k_base *ab,
- u32 vdev_id)
+struct ath11k_vif *ath11k_mac_get_arvif_by_vdev_id(struct ath11k_base *ab,
+ u32 vdev_id)
{
int i;
struct ath11k_pdev *pdev;
@@ -377,7 +377,7 @@ struct ath11k_vif *ath11k_get_arvif_by_vdev_id(struct ath11k_base *ab,
for (i = 0; i < ab->num_radios; i++) {
pdev = rcu_dereference(ab->pdevs_active[i]);
if (pdev && pdev->ar) {
- arvif = ath11k_get_arvif(pdev->ar, vdev_id);
+ arvif = ath11k_mac_get_arvif(pdev->ar, vdev_id);
if (arvif)
return arvif;
}
@@ -386,7 +386,7 @@ struct ath11k_vif *ath11k_get_arvif_by_vdev_id(struct ath11k_base *ab,
return NULL;
}
-struct ath11k *ath11k_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id)
+struct ath11k *ath11k_mac_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id)
{
int i;
struct ath11k_pdev *pdev;
@@ -398,7 +398,7 @@ struct ath11k *ath11k_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id)
for (i = 0; i < ab->num_radios; i++) {
pdev = rcu_dereference(ab->pdevs_active[i]);
if (pdev && pdev->ar) {
- arvif = ath11k_get_arvif(pdev->ar, vdev_id);
+ arvif = ath11k_mac_get_arvif(pdev->ar, vdev_id);
if (arvif)
return arvif->ar;
}
@@ -407,7 +407,7 @@ struct ath11k *ath11k_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id)
return NULL;
}
-struct ath11k *ath11k_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id)
+struct ath11k *ath11k_mac_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id)
{
int i;
struct ath11k_pdev *pdev;
@@ -428,8 +428,8 @@ struct ath11k *ath11k_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id)
return NULL;
}
-struct ath11k *ath11k_get_ar_vdev_stop_status(struct ath11k_base *ab,
- u32 vdev_id)
+struct ath11k *ath11k_mac_get_ar_vdev_stop_status(struct ath11k_base *ab,
+ u32 vdev_id)
{
int i;
struct ath11k_pdev *pdev;
@@ -1790,7 +1790,7 @@ static void ath11k_bss_info_changed(struct ieee80211_hw *hw,
/* Scanning */
/************/
-void __ath11k_scan_finish(struct ath11k *ar)
+void __ath11k_mac_scan_finish(struct ath11k *ar)
{
lockdep_assert_held(&ar->data_lock);
@@ -1820,10 +1820,10 @@ void __ath11k_scan_finish(struct ath11k *ar)
}
}
-void ath11k_scan_finish(struct ath11k *ar)
+void ath11k_mac_scan_finish(struct ath11k *ar)
{
spin_lock_bh(&ar->data_lock);
- __ath11k_scan_finish(ar);
+ __ath11k_mac_scan_finish(ar);
spin_unlock_bh(&ar->data_lock);
}
@@ -1865,7 +1865,7 @@ static int ath11k_scan_stop(struct ath11k *ar)
*/
spin_lock_bh(&ar->data_lock);
if (ar->scan.state != ATH11K_SCAN_IDLE)
- __ath11k_scan_finish(ar);
+ __ath11k_mac_scan_finish(ar);
spin_unlock_bh(&ar->data_lock);
return ret;
@@ -3457,7 +3457,7 @@ static void ath11k_mac_op_tx(struct ieee80211_hw *hw,
}
}
-void ath11k_drain_tx(struct ath11k *ar)
+void ath11k_mac_drain_tx(struct ath11k *ar)
{
/* make sure rcu-protected mac80211 tx path itself is drained */
synchronize_net();
@@ -3488,7 +3488,7 @@ static int ath11k_start(struct ieee80211_hw *hw)
struct ath11k_pdev *pdev = ar->pdev;
int ret;
- ath11k_drain_tx(ar);
+ ath11k_mac_drain_tx(ar);
mutex_lock(&ar->conf_mutex);
switch (ar->state) {
@@ -3591,7 +3591,7 @@ static void ath11k_stop(struct ieee80211_hw *hw)
struct htt_ppdu_stats_info *ppdu_stats, *tmp;
int ret;
- ath11k_drain_tx(ar);
+ ath11k_mac_drain_tx(ar);
mutex_lock(&ar->conf_mutex);
ret = ath11k_mac_config_mon_status_default(ar, false);
diff --git a/drivers/net/wireless/ath/ath11k/mac.h b/drivers/net/wireless/ath/ath11k/mac.h
index f6f8047..071fcbc 100644
--- a/drivers/net/wireless/ath/ath11k/mac.h
+++ b/drivers/net/wireless/ath/ath11k/mac.h
@@ -176,20 +176,20 @@ u8 ath11k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband,
u8 ath11k_mac_hw_rate_to_idx(const struct ieee80211_supported_band *sband,
u8 hw_rate, bool cck);
-void __ath11k_scan_finish(struct ath11k *ar);
-void ath11k_scan_finish(struct ath11k *ar);
+void __ath11k_mac_scan_finish(struct ath11k *ar);
+void ath11k_mac_scan_finish(struct ath11k *ar);
-struct ath11k_vif *ath11k_get_arvif(struct ath11k *ar, u32 vdev_id);
-struct ath11k_vif *ath11k_get_arvif_by_vdev_id(struct ath11k_base *ab,
- u32 vdev_id);
-struct ath11k *ath11k_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id);
-struct ath11k *ath11k_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id);
-struct ath11k *ath11k_get_ar_vdev_stop_status(struct ath11k_base *ab,
- u32 vdev_id);
+struct ath11k_vif *ath11k_mac_get_arvif(struct ath11k *ar, u32 vdev_id);
+struct ath11k_vif *ath11k_mac_get_arvif_by_vdev_id(struct ath11k_base *ab,
+ u32 vdev_id);
+struct ath11k *ath11k_mac_get_ar_by_vdev_id(struct ath11k_base *ab, u32 vdev_id);
+struct ath11k *ath11k_mac_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id);
+struct ath11k *ath11k_mac_get_ar_vdev_stop_status(struct ath11k_base *ab,
+ u32 vdev_id);
void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work);
void ath11k_mgmt_over_wmi_tx_purge(struct ath11k *ar);
-void ath11k_drain_tx(struct ath11k *ar);
+void ath11k_mac_drain_tx(struct ath11k *ar);
void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
#endif
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index f800c77..eee3d82 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3432,7 +3432,7 @@ static void ath11k_wmi_event_scan_start_failed(struct ath11k *ar)
break;
case ATH11K_SCAN_STARTING:
complete(&ar->scan.started);
- __ath11k_scan_finish(ar);
+ __ath11k_mac_scan_finish(ar);
break;
}
}
@@ -3458,7 +3458,7 @@ static void ath11k_wmi_event_scan_completed(struct ath11k *ar)
break;
case ATH11K_SCAN_RUNNING:
case ATH11K_SCAN_ABORTING:
- __ath11k_scan_finish(ar);
+ __ath11k_mac_scan_finish(ar);
break;
}
}
@@ -4263,7 +4263,7 @@ ath11k_wmi_fw_vdev_stats_fill(struct ath11k *ar,
{
u32 len = *length;
u32 buf_len = ATH11K_FW_STATS_BUF_SIZE;
- struct ath11k_vif *arvif = ath11k_get_arvif(ar, vdev->vdev_id);
+ struct ath11k_vif *arvif = ath11k_mac_get_arvif(ar, vdev->vdev_id);
u8 *vif_macaddr;
int i;
@@ -4383,7 +4383,7 @@ ath11k_wmi_fw_bcn_stats_fill(struct ath11k *ar,
{
u32 len = *length;
u32 buf_len = ATH11K_FW_STATS_BUF_SIZE;
- struct ath11k_vif *arvif = ath11k_get_arvif(ar, bcn->vdev_id);
+ struct ath11k_vif *arvif = ath11k_mac_get_arvif(ar, bcn->vdev_id);
u8 *vdev_macaddr;
if (arvif) {
@@ -4724,7 +4724,7 @@ static void ath11k_vdev_start_resp_event(struct ath11k_base *ab, u8 *evt_buf, u3
}
rcu_read_lock();
- ar = ath11k_get_ar_by_vdev_id(ab, vdev_start_resp.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, vdev_start_resp.vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in vdev start resp ev %d",
vdev_start_resp.vdev_id);
@@ -4773,7 +4773,7 @@ static void ath11k_vdev_stopped_event(struct ath11k_base *ab, u8 *evt_buf, u32 l
}
rcu_read_lock();
- ar = ath11k_get_ar_vdev_stop_status(ab, vdev_id);
+ ar = ath11k_mac_get_ar_vdev_stop_status(ab, vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in vdev stopped ev %d",
vdev_id);
@@ -4809,7 +4809,7 @@ static void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
rx_ev.status);
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, rx_ev.pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, rx_ev.pdev_id);
if (!ar) {
ath11k_warn(ab, "invalid pdev_id %d in mgmt_rx_event\n",
@@ -4911,7 +4911,7 @@ static void ath11k_mgmt_tx_compl_event(struct ath11k_base *ab, struct sk_buff *s
}
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, tx_compl_param.pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, tx_compl_param.pdev_id);
if (!ar) {
ath11k_warn(ab, "invalid pdev id %d in mgmt_tx_compl_event\n",
tx_compl_param.pdev_id);
@@ -4977,7 +4977,7 @@ static void ath11k_scan_event(struct ath11k_base *ab, u8 *evt_buf, u32 len)
scan_ev.reason == WMI_SCAN_REASON_CANCELLED)
ar = ath11k_get_ar_on_scan_abort(ab, scan_ev.vdev_id);
else
- ar = ath11k_get_ar_by_vdev_id(ab, scan_ev.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, scan_ev.vdev_id);
if (!ar) {
ath11k_warn(ab, "Received scan event for unknown vdev");
@@ -5049,7 +5049,7 @@ static void ath11k_peer_sta_kickout_event(struct ath11k_base *ab, u8 *evt_buf, u
goto exit;
}
- ar = ath11k_get_ar_by_vdev_id(ab, peer->vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, peer->vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in peer sta kickout ev %d",
peer->vdev_id);
@@ -5089,7 +5089,7 @@ static void ath11k_roam_event(struct ath11k_base *ab, u8 *evt_buf, u32 len)
roam_ev.vdev_id, roam_ev.reason, roam_ev.rssi);
rcu_read_lock();
- ar = ath11k_get_ar_by_vdev_id(ab, roam_ev.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, roam_ev.vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in roam ev %d",
roam_ev.vdev_id);
@@ -5147,7 +5147,7 @@ static void ath11k_chan_info_event(struct ath11k_base *ab, u8 *evt_buf, u32 len)
}
rcu_read_lock();
- ar = ath11k_get_ar_by_vdev_id(ab, ch_info_ev.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, ch_info_ev.vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in chan info ev %d",
ch_info_ev.vdev_id);
@@ -5231,7 +5231,7 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, u8 *evt_buf, u32 len)
tx, rx, rx_bss);
rcu_read_lock();
- ar = ath11k_get_ar_by_pdev_id(ab, bss_ch_info_ev.pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, bss_ch_info_ev.pdev_id);
if (!ar) {
ath11k_warn(ab, "invalid pdev id %d in bss_chan_info event\n",
@@ -5285,7 +5285,7 @@ static void ath11k_vdev_install_key_compl_event(struct ath11k_base *ab, u8 *evt_
install_key_compl.macaddr, install_key_compl.status);
rcu_read_lock();
- ar = ath11k_get_ar_by_vdev_id(ab, install_key_compl.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, install_key_compl.vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in install key compl ev %d",
install_key_compl.vdev_id);
@@ -5357,7 +5357,7 @@ static void ath11k_peer_assoc_conf_event(struct ath11k_base *ab, u8 *evt_buf, u3
"peer assoc conf ev vdev id %d macaddr %pM\n",
peer_assoc_conf.vdev_id, peer_assoc_conf.macaddr);
- ar = ath11k_get_ar_by_vdev_id(ab, peer_assoc_conf.vdev_id);
+ ar = ath11k_mac_get_ar_by_vdev_id(ab, peer_assoc_conf.vdev_id);
if (!ar) {
ath11k_warn(ab, "invalid vdev id in peer assoc conf ev %d",
@@ -5425,7 +5425,7 @@ ath11k_wmi_process_csa_switch_count_event(struct ath11k_base *ab,
rcu_read_lock();
for (i = 0; i < ev->num_vdevs; i++) {
- arvif = ath11k_get_arvif_by_vdev_id(ab, vdev_ids[i]);
+ arvif = ath11k_mac_get_arvif_by_vdev_id(ab, vdev_ids[i]);
if (!arvif) {
ath11k_warn(ab, "Recvd csa status for unknown vdev %d",
@@ -5506,7 +5506,7 @@ ath11k_wmi_pdev_dfs_radar_detected_event(struct ath11k_base *ab,
ev->detector_id, ev->segment_id, ev->timestamp, ev->is_chirp,
ev->freq_offset, ev->sidx);
- ar = ath11k_get_ar_by_pdev_id(ab, ev->pdev_id);
+ ar = ath11k_mac_get_ar_by_pdev_id(ab, ev->pdev_id);
if (!ar) {
ath11k_warn(ab, "radar detected in invalid pdev %d\n",
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/8] ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 3/8] ath11k: move ath11k_smps_map[] to the beginning of the file Manikanta Pubbisetty ` (6 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty make ath11k_mgmt_over_wmi_tx_*() functions static in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/mac.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 2e87b1a..e3bca88 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3382,7 +3382,7 @@ static int ath11k_mac_mgmt_tx_wmi(struct ath11k *ar, struct ath11k_vif *arvif, return ret; } -void ath11k_mgmt_over_wmi_tx_purge(struct ath11k *ar) +static void ath11k_mgmt_over_wmi_tx_purge(struct ath11k *ar) { struct sk_buff *skb; @@ -3390,7 +3390,7 @@ void ath11k_mgmt_over_wmi_tx_purge(struct ath11k *ar) ieee80211_free_txskb(ar->hw, skb); } -void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) +static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) { struct ath11k *ar = container_of(work, struct ath11k, wmi_mgmt_tx_work); struct ieee80211_tx_info *info; diff --git a/drivers/net/wireless/ath/ath11k/mac.h b/drivers/net/wireless/ath/ath11k/mac.h index 071fcbc..7ced4bc1 100644 --- a/drivers/net/wireless/ath/ath11k/mac.h +++ b/drivers/net/wireless/ath/ath11k/mac.h @@ -187,8 +187,6 @@ struct ath11k *ath11k_mac_get_ar_by_pdev_id(struct ath11k_base *ab, u32 pdev_id) struct ath11k *ath11k_mac_get_ar_vdev_stop_status(struct ath11k_base *ab, u32 vdev_id); -void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work); -void ath11k_mgmt_over_wmi_tx_purge(struct ath11k *ar); void ath11k_mac_drain_tx(struct ath11k *ar); void ath11k_mac_peer_cleanup_all(struct ath11k *ar); int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx); -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/8] ath11k: move ath11k_smps_map[] to the beginning of the file 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 2/8] ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 4/8] ath11k: use ath11k_mac_op_ prefix for functions in ath11k_ops Manikanta Pubbisetty ` (5 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty move ath11k_smps_map[] to the beginning of the file in mac.c . Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index e3bca88..6c1b331 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -167,6 +167,13 @@ const struct htt_rx_ring_tlv_filter ath11k_mac_mon_status_filter_default = { #define ath11k_a_rates (ath11k_legacy_rates + 4) #define ath11k_a_rates_size (ARRAY_SIZE(ath11k_legacy_rates) - 4) +static const u32 ath11k_smps_map[] = { + [WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC, + [WLAN_HT_CAP_SM_PS_DYNAMIC] = WMI_PEER_SMPS_DYNAMIC, + [WLAN_HT_CAP_SM_PS_INVALID] = WMI_PEER_SMPS_PS_NONE, + [WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE, +}; + int ath11k_mac_hw_ratecode_to_legacy_rate(u8 hw_rc, u8 preamble, u8 *rateidx, u16 *rate) { @@ -1503,13 +1510,6 @@ static void ath11k_peer_assoc_prepare(struct ath11k *ar, /* TODO: amsdu_disable req? */ } -static const u32 ath11k_smps_map[] = { - [WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC, - [WLAN_HT_CAP_SM_PS_DYNAMIC] = WMI_PEER_SMPS_DYNAMIC, - [WLAN_HT_CAP_SM_PS_INVALID] = WMI_PEER_SMPS_PS_NONE, - [WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE, -}; - static int ath11k_setup_peer_smps(struct ath11k *ar, struct ath11k_vif *arvif, const u8 *addr, const struct ieee80211_sta_ht_cap *ht_cap) -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/8] ath11k: use ath11k_mac_op_ prefix for functions in ath11k_ops 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 2/8] ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 3/8] ath11k: move ath11k_smps_map[] to the beginning of the file Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 5/8] ath11k: add approprite comments for no-op functions Manikanta Pubbisetty ` (4 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty add ath11k_mac_op_ prefix for all functions defined in ath11k_ops in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 146 +++++++++++++++++----------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 6c1b331..25f9b50 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -654,7 +654,7 @@ static int ath11k_monitor_vdev_up(struct ath11k *ar, int vdev_id) return 0; } -static int ath11k_config(struct ieee80211_hw *hw, u32 changed) +static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) { struct ath11k *ar = hw->priv; int ret = 0; @@ -1629,10 +1629,10 @@ static void ath11k_bss_disassoc(struct ieee80211_hw *hw, /* TODO: cancel connection_loss_work */ } -static void ath11k_bss_info_changed(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *info, - u32 changed) +static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *info, + u32 changed) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); @@ -1949,9 +1949,9 @@ static int ath11k_start_scan(struct ath11k *ar, return 0; } -static int ath11k_hw_scan(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_scan_request *hw_req) +static int ath11k_mac_op_hw_scan(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_scan_request *hw_req) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); @@ -2032,8 +2032,8 @@ static int ath11k_hw_scan(struct ieee80211_hw *hw, return ret; } -static void ath11k_cancel_hw_scan(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) +static void ath11k_mac_op_cancel_hw_scan(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) { struct ath11k *ar = hw->priv; @@ -2147,9 +2147,9 @@ static int ath11k_clear_peer_keys(struct ath11k_vif *arvif, return first_errno; } -static int ath11k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - struct ieee80211_vif *vif, struct ieee80211_sta *sta, - struct ieee80211_key_conf *key) +static int ath11k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, + struct ieee80211_vif *vif, struct ieee80211_sta *sta, + struct ieee80211_key_conf *key) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); @@ -2541,11 +2541,11 @@ static void ath11k_mac_dec_num_stations(struct ath11k_vif *arvif, ar->num_stations--; } -static int ath11k_sta_state(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - enum ieee80211_sta_state old_state, - enum ieee80211_sta_state new_state) +static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + enum ieee80211_sta_state old_state, + enum ieee80211_sta_state new_state) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); @@ -2673,10 +2673,10 @@ static int ath11k_sta_state(struct ieee80211_hw *hw, return ret; } -static void ath11k_sta_rc_update(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - u32 changed) +static void ath11k_mac_op_sta_rc_update(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + u32 changed) { struct ath11k *ar = hw->priv; struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; @@ -2816,9 +2816,9 @@ static int ath11k_conf_tx_uapsd(struct ath11k *ar, struct ieee80211_vif *vif, return ret; } -static int ath11k_conf_tx(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, u16 ac, - const struct ieee80211_tx_queue_params *params) +static int ath11k_mac_op_conf_tx(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, u16 ac, + const struct ieee80211_tx_queue_params *params) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = (void *)vif->drv_priv; @@ -3481,7 +3481,7 @@ static int ath11k_mac_config_mon_status_default(struct ath11k *ar, bool enable) DP_RX_BUFFER_SIZE, &tlv_filter); } -static int ath11k_start(struct ieee80211_hw *hw) +static int ath11k_mac_op_start(struct ieee80211_hw *hw) { struct ath11k *ar = hw->priv; struct ath11k_base *ab = ar->ab; @@ -3585,7 +3585,7 @@ static int ath11k_start(struct ieee80211_hw *hw) return ret; } -static void ath11k_stop(struct ieee80211_hw *hw) +static void ath11k_mac_op_stop(struct ieee80211_hw *hw) { struct ath11k *ar = hw->priv; struct htt_ppdu_stats_info *ppdu_stats, *tmp; @@ -3703,8 +3703,8 @@ static int ath11k_set_he_mu_sounding_mode(struct ath11k *ar, return ret; } -static int ath11k_add_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) +static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) { struct ath11k *ar = hw->priv; struct ath11k_base *ab = ar->ab; @@ -3931,8 +3931,8 @@ static int ath11k_mac_vif_unref(int buf_id, void *skb, void *ctx) return 0; } -static void ath11k_remove_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) +static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) { struct ath11k *ar = hw->priv; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); @@ -3995,10 +3995,10 @@ static void ath11k_remove_interface(struct ieee80211_hw *hw, FIF_PROBE_REQ | \ FIF_FCSFAIL) -static void ath11k_configure_filter(struct ieee80211_hw *hw, - unsigned int changed_flags, - unsigned int *total_flags, - u64 multicast) +static void ath11k_mac_op_configure_filter(struct ieee80211_hw *hw, + unsigned int changed_flags, + unsigned int *total_flags, + u64 multicast) { struct ath11k *ar = hw->priv; bool reset_flag = false; @@ -4026,7 +4026,7 @@ static void ath11k_configure_filter(struct ieee80211_hw *hw, mutex_unlock(&ar->conf_mutex); } -static int ath11k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) +static int ath11k_mac_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) { struct ath11k *ar = hw->priv; @@ -4040,7 +4040,7 @@ static int ath11k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) return 0; } -static int ath11k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) +static int ath11k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) { struct ath11k *ar = hw->priv; int ret; @@ -4052,9 +4052,9 @@ static int ath11k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) return ret; } -static int ath11k_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_ampdu_params *params) +static int ath11k_mac_op_ampdu_action(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_ampdu_params *params) { struct ath11k *ar = hw->priv; int ret = -EINVAL; @@ -4603,7 +4603,7 @@ ath11k_set_vdev_param_to_all_vifs(struct ath11k *ar, int param, u32 value) /* mac80211 stores device specific RTS/Fragmentation threshold value, * this is set interface specific to firmware from ath11k driver */ -static int ath11k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) +static int ath11k_mac_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value) { struct ath11k *ar = hw->priv; int param_id = WMI_VDEV_PARAM_RTS_THRESHOLD; @@ -4611,7 +4611,7 @@ static int ath11k_set_rts_threshold(struct ieee80211_hw *hw, u32 value) return ath11k_set_vdev_param_to_all_vifs(ar, param_id, value); } -static int ath11k_set_frag_threshold(struct ieee80211_hw *hw, u32 value) +static int ath11k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) { /* Even though there's a WMI vdev param for fragmentation threshold no * known firmware actually implements it. Moreover it is not possible to @@ -4626,8 +4626,8 @@ static int ath11k_set_frag_threshold(struct ieee80211_hw *hw, u32 value) return -EOPNOTSUPP; } -static void ath11k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - u32 queues, bool drop) +static void ath11k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + u32 queues, bool drop) { struct ath11k *ar = hw->priv; long time_left; @@ -4985,8 +4985,8 @@ ath11k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, } static void -ath11k_reconfig_complete(struct ieee80211_hw *hw, - enum ieee80211_reconfig_type reconfig_type) +ath11k_mac_op_reconfig_complete(struct ieee80211_hw *hw, + enum ieee80211_reconfig_type reconfig_type) { struct ath11k *ar = hw->priv; @@ -5038,7 +5038,7 @@ ath11k_mac_update_bss_chan_survey(struct ath11k *ar, ath11k_warn(ar->ab, "bss channel survey timed out\n"); } -static int ath11k_get_survey(struct ieee80211_hw *hw, int idx, +static int ath11k_mac_op_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey) { struct ath11k *ar = hw->priv; @@ -5083,10 +5083,10 @@ static int ath11k_get_survey(struct ieee80211_hw *hw, int idx, return ret; } -static void ath11k_sta_statistics(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, - struct station_info *sinfo) +static void ath11k_mac_op_sta_statistics(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct station_info *sinfo) { struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; @@ -5115,35 +5115,35 @@ static void ath11k_sta_statistics(struct ieee80211_hw *hw, static const struct ieee80211_ops ath11k_ops = { .tx = ath11k_mac_op_tx, - .start = ath11k_start, - .stop = ath11k_stop, - .reconfig_complete = ath11k_reconfig_complete, - .add_interface = ath11k_add_interface, - .remove_interface = ath11k_remove_interface, - .config = ath11k_config, - .bss_info_changed = ath11k_bss_info_changed, - .configure_filter = ath11k_configure_filter, - .hw_scan = ath11k_hw_scan, - .cancel_hw_scan = ath11k_cancel_hw_scan, - .set_key = ath11k_set_key, - .sta_state = ath11k_sta_state, - .sta_rc_update = ath11k_sta_rc_update, - .conf_tx = ath11k_conf_tx, - .set_antenna = ath11k_set_antenna, - .get_antenna = ath11k_get_antenna, - .ampdu_action = ath11k_ampdu_action, + .start = ath11k_mac_op_start, + .stop = ath11k_mac_op_stop, + .reconfig_complete = ath11k_mac_op_reconfig_complete, + .add_interface = ath11k_mac_op_add_interface, + .remove_interface = ath11k_mac_op_remove_interface, + .config = ath11k_mac_op_config, + .bss_info_changed = ath11k_mac_op_bss_info_changed, + .configure_filter = ath11k_mac_op_configure_filter, + .hw_scan = ath11k_mac_op_hw_scan, + .cancel_hw_scan = ath11k_mac_op_cancel_hw_scan, + .set_key = ath11k_mac_op_set_key, + .sta_state = ath11k_mac_op_sta_state, + .sta_rc_update = ath11k_mac_op_sta_rc_update, + .conf_tx = ath11k_mac_op_conf_tx, + .set_antenna = ath11k_mac_op_set_antenna, + .get_antenna = ath11k_mac_op_get_antenna, + .ampdu_action = ath11k_mac_op_ampdu_action, .add_chanctx = ath11k_mac_op_add_chanctx, .remove_chanctx = ath11k_mac_op_remove_chanctx, .change_chanctx = ath11k_mac_op_change_chanctx, .assign_vif_chanctx = ath11k_mac_op_assign_vif_chanctx, .unassign_vif_chanctx = ath11k_mac_op_unassign_vif_chanctx, .switch_vif_chanctx = ath11k_mac_op_switch_vif_chanctx, - .set_rts_threshold = ath11k_set_rts_threshold, - .set_frag_threshold = ath11k_set_frag_threshold, + .set_rts_threshold = ath11k_mac_op_set_rts_threshold, + .set_frag_threshold = ath11k_mac_op_set_frag_threshold, .set_bitrate_mask = ath11k_mac_op_set_bitrate_mask, - .get_survey = ath11k_get_survey, - .flush = ath11k_flush, - .sta_statistics = ath11k_sta_statistics, + .get_survey = ath11k_mac_op_get_survey, + .flush = ath11k_mac_op_flush, + .sta_statistics = ath11k_mac_op_sta_statistics, CFG80211_TESTMODE_CMD(ath11k_tm_cmd) #ifdef CONFIG_MAC80211_DEBUGFS .sta_add_debugfs = ath11k_sta_add_debugfs, -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/8] ath11k: add approprite comments for no-op functions 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty ` (2 preceding siblings ...) 2019-06-24 11:49 ` [PATCH 4/8] ath11k: use ath11k_mac_op_ prefix for functions in ath11k_ops Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 6/8] ath11k: avoid use of magic numbers Manikanta Pubbisetty ` (3 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty Add appropriate comments for no-op functions defined in ath11k_ops in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 25f9b50..f878479 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -659,6 +659,11 @@ static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) struct ath11k *ar = hw->priv; int ret = 0; + /* mac80211 requires this op to be present and that's why + * there's an empty function, this can be extended when + * required. + */ + mutex_lock(&ar->conf_mutex); /* TODO: Handle configuration changes as appropriate */ -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/8] ath11k: avoid use of magic numbers 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty ` (3 preceding siblings ...) 2019-06-24 11:49 ` [PATCH 5/8] ath11k: add approprite comments for no-op functions Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 7/8] ath11k: remove unnecessary parenthesis Manikanta Pubbisetty ` (2 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty Use macros where ever necessary, replace magic numbers with appropriate macros in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index f878479..2fd1bfc 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -167,6 +167,8 @@ const struct htt_rx_ring_tlv_filter ath11k_mac_mon_status_filter_default = { #define ath11k_a_rates (ath11k_legacy_rates + 4) #define ath11k_a_rates_size (ARRAY_SIZE(ath11k_legacy_rates) - 4) +#define ATH11K_MAC_SCAN_TIMEOUT_MSECS 200 /* in msecs */ + static const u32 ath11k_smps_map[] = { [WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC, [WLAN_HT_CAP_SM_PS_DYNAMIC] = WMI_PEER_SMPS_DYNAMIC, @@ -2027,7 +2029,7 @@ static int ath11k_mac_op_hw_scan(struct ieee80211_hw *hw, /* Add a 200ms margin to account for event/command processing */ ieee80211_queue_delayed_work(ar->hw, &ar->scan.timeout, msecs_to_jiffies(arg.max_scan_time + - 200)); + ATH11K_MAC_SCAN_TIMEOUT_MSECS)); exit: if (req->ie_len) -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/8] ath11k: remove unnecessary parenthesis 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty ` (4 preceding siblings ...) 2019-06-24 11:49 ` [PATCH 6/8] ath11k: avoid use of magic numbers Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 8/8] ath11k: use switch statement when necessary Manikanta Pubbisetty 2019-06-25 14:23 ` [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Kalle Valo 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty Remove unnecessary parenthesis in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 2fd1bfc..2274f77 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -2365,7 +2365,7 @@ static int ath11k_station_assoc(struct ath11k *ar, return ret; } - if ((sta->wme && sta->uapsd_queues)) { + if (sta->wme && sta->uapsd_queues) { ret = ath11k_peer_assoc_qos_ap(ar, arvif, sta); if (ret) { ath11k_warn(ar->ab, "failed to set qos params for STA %pM for vdev %i: %d\n", -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/8] ath11k: use switch statement when necessary 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty ` (5 preceding siblings ...) 2019-06-24 11:49 ` [PATCH 7/8] ath11k: remove unnecessary parenthesis Manikanta Pubbisetty @ 2019-06-24 11:49 ` Manikanta Pubbisetty 2019-06-25 14:23 ` [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Kalle Valo 7 siblings, 0 replies; 9+ messages in thread From: Manikanta Pubbisetty @ 2019-06-24 11:49 UTC (permalink / raw) To: ath11k; +Cc: Manikanta Pubbisetty use switch statement instead of mutliple if statements in ath11k_mac_op_add_interface() in mac.c file. Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> --- drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 2274f77..fa92cf7 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3828,7 +3828,8 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, goto err_vdev_del; } - if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { + switch (arvif->vdev_type) { + case WMI_VDEV_TYPE_AP: peer_param.vdev_id = arvif->vdev_id; peer_param.peer_addr = vif->addr; peer_param.peer_type = WMI_PEER_TYPE_DEFAULT; @@ -3838,18 +3839,15 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, arvif->vdev_id, ret); goto err_vdev_del; } - } - if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { ret = ath11k_mac_set_kickout(arvif); if (ret) { ath11k_warn(ar->ab, "failed to set vdev %i kickout parameters: %d\n", arvif->vdev_id, ret); goto err_peer_del; } - } - - if (arvif->vdev_type == WMI_VDEV_TYPE_STA) { + break; + case WMI_VDEV_TYPE_STA: param_id = WMI_STA_PS_PARAM_RX_WAKE_POLICY; param_value = WMI_STA_PS_RX_WAKE_POLICY_WAKE; ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, @@ -3879,6 +3877,9 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, arvif->vdev_id, ret); goto err_peer_del; } + break; + default: + break; } arvif->txpower = vif->bss_conf.txpower; -- 2.7.4 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/8] ath11k: correct prefix for public functions in mac.c 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty ` (6 preceding siblings ...) 2019-06-24 11:49 ` [PATCH 8/8] ath11k: use switch statement when necessary Manikanta Pubbisetty @ 2019-06-25 14:23 ` Kalle Valo 7 siblings, 0 replies; 9+ messages in thread From: Kalle Valo @ 2019-06-25 14:23 UTC (permalink / raw) To: Manikanta Pubbisetty; +Cc: ath11k Manikanta Pubbisetty <mpubbise@codeaurora.org> wrote: > Use ath11k_mac_ prefix for all public functions defined > in mac.c file. > > Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> 8 patches applied to ath11k-bringup branch of ath.git, thanks. 82ca15f54e9f ath11k: correct prefix for public functions in mac.c aa9fe5e5483c ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static 8119fc4fb9b1 ath11k: move ath11k_smps_map[] to the beginning of the file 8d1a7d05b34e ath11k: use ath11k_mac_op_ prefix for functions in ath11k_ops 1306a30c2052 ath11k: add approprite comments for no-op functions ee997259ac6b ath11k: avoid use of magic numbers ba7f9b8c7ffa ath11k: remove unnecessary parenthesis e6d0f2ebd5c8 ath11k: use switch statement when necessary -- https://patchwork.kernel.org/patch/11012929/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-25 14:23 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-24 11:49 [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 2/8] ath11k: make ath11k_mgmt_over_wmi_tx_*() functions static Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 3/8] ath11k: move ath11k_smps_map[] to the beginning of the file Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 4/8] ath11k: use ath11k_mac_op_ prefix for functions in ath11k_ops Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 5/8] ath11k: add approprite comments for no-op functions Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 6/8] ath11k: avoid use of magic numbers Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 7/8] ath11k: remove unnecessary parenthesis Manikanta Pubbisetty 2019-06-24 11:49 ` [PATCH 8/8] ath11k: use switch statement when necessary Manikanta Pubbisetty 2019-06-25 14:23 ` [PATCH 1/8] ath11k: correct prefix for public functions in mac.c Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox