ath10k: fix checkpatch warnings 20130426
cover ath10k: fix checkpatch warnings 20130426
Trying to get the number of checkpatch warnings smaller.
---
Kalle Valo (5):
ath10k: fix checkpatch warnings in mac.c
ath10k: fix some checkpatch warnings in wmi.c
ath10k: fix some checkpatch warnings in pci.c
ath10k: fix some checkpatch errors in ce.c
ath10k: fix some checkpatch errors in wmi.h
drivers/net/wireless/ath/ath10k/ce.c | 80 +++++++++++------ drivers/net/wireless/ath/ath10k/mac.c | 103 +++++++++++++--------- drivers/net/wireless/ath/ath10k/pci.c | 89 ++++++++++++------- drivers/net/wireless/ath/ath10k/wmi.c | 100 ++++++++++++++------- drivers/net/wireless/ath/ath10k/wmi.h | 155 ++++++++++++++++++++++++--------- 5 files changed, 347 insertions(+), 180 deletions(-)
PATCH 1/5 ath10k: fix checkpatch warnings in mac.c
--- drivers/net/wireless/ath/ath10k/mac.c | 103 +++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 43 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +60 -43
@@ -155,12 +155,14 @@ static int ath10k_clear_peer_keys(struct ath10k_vif *arvif,if (peer->keys[i] ==NULL )continue ; - ret =ath10k_install_key (arvif, peer->keys[i],DISABLE_KEY , addr); + ret =ath10k_install_key (arvif, peer->keys[i], +DISABLE_KEY , addr);if (ret && first_errno ==0 ) first_errno = ret;if (ret) -ath10k_warn ("could not remove peer wep key %d (%d)\n" , i, ret); +ath10k_warn ("could not remove peer wep key %d (%d)\n" , + i, ret); peer->keys[i] =NULL ; }
@@ -618,9 +620,8 @@ static void ath10k_control_ibss(struct ath10k_vif *arvif,if (!info->ibss_joined) { ret =ath10k_peer_delete (arvif->ar, arvif->vdev_id, self_peer);if (ret) -ath10k_warn ("Failed to delete IBSS self peer:%pM " -"for VDEV:%d ret:%d\n" , self_peer, - arvif->vdev_id, ret); +ath10k_warn ("Failed to delete IBSS self peer:%pM for VDEV:%d ret:%d\n" , + self_peer, arvif->vdev_id, ret);if (is_zero_ether_addr (arvif->u.ibss.bssid))return ;
@@ -628,9 +629,8 @@ static void ath10k_control_ibss(struct ath10k_vif *arvif, ret =ath10k_peer_delete (arvif->ar, arvif->vdev_id, arvif->u.ibss.bssid);if (ret) { -ath10k_warn ("Failed to delete IBSS BSSID peer:%pM " -"for VDEV:%d ret:%d\n" , arvif->u.ibss.bssid, - arvif->vdev_id, ret); +ath10k_warn ("Failed to delete IBSS BSSID peer:%pM for VDEV:%d ret:%d\n" , + arvif->u.ibss.bssid, arvif->vdev_id, ret);return ; }
@@ -641,8 +641,8 @@ static void ath10k_control_ibss(struct ath10k_vif *arvif, ret =ath10k_peer_create (arvif->ar, arvif->vdev_id, self_peer);if (ret) { -ath10k_warn ("Failed to create IBSS self peer:%pM for VDEV:%d" -"ret:%d\n" , self_peer, arvif->vdev_id, ret); +ath10k_warn ("Failed to create IBSS self peer:%pM for VDEV:%d ret:%d\n" , + self_peer, arvif->vdev_id, ret);return ; }
@@ -657,7 +657,8 @@ static void ath10k_control_ibss(struct ath10k_vif *arvif,/* * Review this when mac80211 gains per-interface powersave support. */ -static void ath10k_config_ps_iter (void *data,u8 *mac,struct ieee80211_vif *vif) +static void ath10k_config_ps_iter (void *data,u8 *mac, +struct ieee80211_vif *vif) {struct ath10k_generic_iter *ar_iter = data;struct ieee80211_conf *conf = &ar_iter->ar->hw->conf;
@@ -972,7 +973,8 @@ static void ath10k_bss_assoc(struct ieee80211_hw *hw,rcu_read_unlock (); - ret =ath10k_wmi_vdev_up (ar, arvif->vdev_id, bss_conf->aid, bss_conf->bssid); + ret =ath10k_wmi_vdev_up (ar, arvif->vdev_id, bss_conf->aid, + bss_conf->bssid);if (ret)ath10k_warn ("VDEV: %d up failed: ret %d\n" , arvif->vdev_id, ret);
@@ -1075,7 +1077,8 @@ static void ath10k_update_channel_list(struct ath10k *ar)continue ;for (i =0 ; i < bands[band]->n_channels; i++) { -if (bands[band]->channels[i].flags &IEEE80211_CHAN_DISABLED ) +if (bands[band]->channels[i].flags & +IEEE80211_CHAN_DISABLED )continue ; arg.n_channels++;
@@ -1102,23 +1105,22 @@ static void ath10k_update_channel_list(struct ath10k *ar) ch->allow_ht = true; ch->allow_ibss = !(channel->flags &IEEE80211_CHAN_NO_IBSS ); - ch->ht40plus = !(channel->flags &IEEE80211_CHAN_NO_HT40PLUS ); - ch->passive = !!(channel->flags &IEEE80211_CHAN_PASSIVE_SCAN ); + ch->ht40plus = !(channel->flags &IEEE80211_CHAN_NO_HT40PLUS ); + ch->passive = !!(channel->flags &IEEE80211_CHAN_PASSIVE_SCAN ); - ch->freq = channel->center_freq; - ch->min_power = channel->max_power *3 ; - ch->max_power = channel->max_power *4 ; - ch->max_reg_power = channel->max_reg_power *4 ; + ch->freq = channel->center_freq; + ch->min_power = channel->max_power *3 ; + ch->max_power = channel->max_power *4 ; + ch->max_reg_power = channel->max_reg_power *4 ; ch->max_antenna_gain = channel->max_antenna_gain; - ch->reg_class_id =0 ;/* FIXME */ - ch->mode =chan_to_phymode (channel,NL80211_CHAN_NO_HT ); + ch->reg_class_id =0 ;/* FIXME */ + ch->mode =chan_to_phymode (channel,NL80211_CHAN_NO_HT );if (WARN_ON_ONCE (ch->mode ==MODE_UNKNOWN ))continue ; -ath10k_dbg (ATH10K_DBG_WMI ,"%s: [%zd/%d] freq %d " -"maxpower %d regpower %d antenna %d " -"mode %d\n" , +ath10k_dbg (ATH10K_DBG_WMI , +"%s: [%zd/%d] freq %d maxpower %d regpower %d antenna %d mode %d\n" , __func__, ch - arg.channels, arg.n_channels, ch->freq, ch->max_power, ch->max_reg_power, ch->max_antenna_gain, ch->mode);
@@ -1191,7 +1193,8 @@ static void ath10k_tx_h_qos_workaround(struct ieee80211_hw *hw, }else { qos_ctl =ieee80211_get_qos_ctl (hdr);memmove (qos_ctl, qos_ctl +IEEE80211_QOS_CTL_LEN , - skb->len - (qos_ctl +IEEE80211_QOS_CTL_LEN - skb->data)); + skb->len - + (qos_ctl +IEEE80211_QOS_CTL_LEN - skb->data));skb_trim (skb, skb->len -IEEE80211_QOS_CTL_LEN ); } }
@@ -1251,7 +1254,8 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar, struct sk_buff *skb)if (unlikely (ieee80211_is_probe_resp (hdr->frame_control))) {spin_lock_bh (&ar->data_lock);if (arvif->u.ap.noa_data) -if (!pskb_expand_head (skb,0 , arvif->u.ap.noa_len,GFP_ATOMIC )) +if (!pskb_expand_head (skb,0 , arvif->u.ap.noa_len, +GFP_ATOMIC ))memcpy (skb_put (skb, arvif->u.ap.noa_len), arvif->u.ap.noa_data, arvif->u.ap.noa_len);
@@ -1312,7 +1316,8 @@ void ath10k_offchan_tx_work(struct work_struct *work)mutex_lock (&ar->conf_mutex); -ath10k_dbg (ATH10K_DBG_MAC ,"processing offchannel skb %p\n" , skb); +ath10k_dbg (ATH10K_DBG_MAC ,"processing offchannel skb %p\n" , + skb); hdr = (struct ieee80211_hdr *)skb->data; peer_addr =ieee80211_get_DA (hdr);
@@ -1324,7 +1329,7 @@ void ath10k_offchan_tx_work(struct work_struct *work)if (peer)ath10k_dbg (ATH10K_DBG_MAC ,"peer %pM on vdev %d already present\n" , - peer_addr, vdev_id); + peer_addr, vdev_id);if (!peer) { ret =ath10k_peer_create (ar, vdev_id, peer_addr);
@@ -1340,9 +1345,11 @@ void ath10k_offchan_tx_work(struct work_struct *work)ath10k_tx_htt (ar, skb); - ret =wait_for_completion_timeout (&ar->offchan_tx_completed,3 *HZ ); + ret =wait_for_completion_timeout (&ar->offchan_tx_completed, +3 *HZ );if (ret <=0 ) -ath10k_warn ("timed out waiting for offchannel skb %p\n" , skb); +ath10k_warn ("timed out waiting for offchannel skb %p\n" , + skb);if (!peer) { ret =ath10k_peer_delete (ar, vdev_id, peer_addr);
@@ -1410,7 +1417,8 @@ static void ath10k_abort_scan(struct ath10k *ar) ret =ath10k_wmi_stop_scan (ar, &arg);if (ret) -ath10k_warn ("%s: ath10k_wmi_stop_scan failed (%d)\n" , __func__, ret); +ath10k_warn ("%s: ath10k_wmi_stop_scan failed (%d)\n" , + __func__, ret);ath10k_wmi_flush_tx (ar);
@@ -1523,11 +1531,13 @@ static int ath10k_start(struct ieee80211_hw *hw) ret =ath10k_wmi_pdev_set_param (ar,WMI_PDEV_PARAM_PMF_QOS ,1 );if (ret) -ath10k_warn ("could not enable WMI_PDEV_PARAM_PMF_QOS (%d)\n" , ret); +ath10k_warn ("could not enable WMI_PDEV_PARAM_PMF_QOS (%d)\n" , + ret); ret =ath10k_wmi_pdev_set_param (ar,WMI_PDEV_PARAM_DYNAMIC_BW ,0 );if (ret) -ath10k_warn ("could not init WMI_PDEV_PARAM_DYNAMIC_BW (%d)\n" , ret); +ath10k_warn ("could not init WMI_PDEV_PARAM_DYNAMIC_BW (%d)\n" , + ret);return 0 ; }
@@ -1560,8 +1570,9 @@ static int ath10k_config(struct ieee80211_hw *hw, u32 changed)memset (&ar_iter,0 ,sizeof (struct ath10k_generic_iter )); ar_iter.ar = ar;ieee80211_iterate_active_interfaces_atomic (hw, -IEEE80211_IFACE_ITER_RESUME_ALL , - ath10k_config_ps_iter, &ar_iter); +IEEE80211_IFACE_ITER_RESUME_ALL , + ath10k_config_ps_iter, + &ar_iter); ret = ar_iter.ret; }
@@ -1832,7 +1843,8 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,if (changed &BSS_CHANGED_BSSID ) {if (!is_zero_ether_addr (info->bssid)) { - ret =ath10k_peer_create (ar, arvif->vdev_id, info->bssid); + ret =ath10k_peer_create (ar, arvif->vdev_id, + info->bssid);if (ret)ath10k_warn ("Failed to add peer: %pM for VDEV: %d\n" , info->bssid, arvif->vdev_id);
@@ -1847,7 +1859,8 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,* this is never erased as we it for crypto key * clearing; this is FW requirement */ -memcpy (arvif->u.sta.bssid, info->bssid,ETH_ALEN ); +memcpy (arvif->u.sta.bssid, info->bssid, +ETH_ALEN ); ret =ath10k_vdev_start (arvif);if (!ret)
@@ -1862,7 +1875,8 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,* IBSS in order to remove BSSID peer. */ if (vif->type ==NL80211_IFTYPE_ADHOC ) -memcpy (arvif->u.ibss.bssid, info->bssid,ETH_ALEN ); +memcpy (arvif->u.ibss.bssid, info->bssid, +ETH_ALEN ); } }
@@ -2348,7 +2362,7 @@ static int ath10k_set_frag_threshold(struct ieee80211_hw *hw, u32 value)mutex_lock (&ar->conf_mutex);ieee80211_iterate_active_interfaces (hw,IEEE80211_IFACE_ITER_RESUME_ALL , - ath10k_set_frag_iter, &ar_iter); + ath10k_set_frag_iter, &ar_iter);mutex_unlock (&ar->conf_mutex);return ar_iter.ret;
@@ -2367,7 +2381,8 @@ static void ath10k_flush(struct ieee80211_hw *hw, u32 queues, bool drop) ret =wait_event_timeout (ar->htt->empty_tx_wq, ({bool empty;spin_lock_bh (&ar->htt->tx_lock); - empty =bitmap_empty (ar->htt->used_msdu_ids,HTT_MAX_NUM_PENDING_TX ); + empty =bitmap_empty (ar->htt->used_msdu_ids, +HTT_MAX_NUM_PENDING_TX );spin_unlock_bh (&ar->htt->tx_lock); (empty); }),ATH10K_FLUSH_TIMEOUT_HZ );
@@ -2607,7 +2622,8 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar) } -static void ath10k_get_arvif_iter (void *data,u8 *mac,struct ieee80211_vif *vif) +static void ath10k_get_arvif_iter (void *data,u8 *mac, +struct ieee80211_vif *vif) {struct ath10k_vif_iter *arvif_iter = data;struct ath10k_vif *arvif =ath10k_vif_to_arvif (vif);
@@ -2624,8 +2640,9 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar, u32 vdev_id) arvif_iter.vdev_id = vdev_id;ieee80211_iterate_active_interfaces_atomic (ar->hw, -IEEE80211_IFACE_ITER_RESUME_ALL , - ath10k_get_arvif_iter, &arvif_iter); +IEEE80211_IFACE_ITER_RESUME_ALL , + ath10k_get_arvif_iter, + &arvif_iter);if (!arvif_iter.arvif) {ath10k_warn ("No VIF found for VDEV: %d\n" , vdev_id);return NULL ;
PATCH 2/5 ath10k: fix some checkpatch warnings in wmi.c
In reply to Kalle Valo--- drivers/net/wireless/ath/ath10k/wmi.c | 100 ++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 34 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.c +66 -34
@@ -367,7 +367,8 @@ static int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)ath10k_dbg (ATH10K_DBG_WMI ,"event mgmt rx freq %d band %d snr %d, rate_idx %d\n" , - status->freq, status->band, status->signal, status->rate_idx); + status->freq, status->band, status->signal, + status->rate_idx);/* * packets from HTC come aligned to 4byte boundaries
@@ -394,7 +395,8 @@ static void ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb)ath10k_dbg (ATH10K_DBG_WMI ,"WMI_DEBUG_MESG_EVENTID\n" ); } -static void ath10k_wmi_event_update_stats (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_update_stats (struct ath10k *ar, +struct sk_buff *skb) {struct wmi_stats_event *ev = (void *)skb->data;
@@ -403,7 +405,8 @@ static void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skbath10k_debug_read_target_stats (ar, ev); } -static void ath10k_wmi_event_vdev_start_resp (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_vdev_start_resp (struct ath10k *ar, +struct sk_buff *skb) {struct wmi_vdev_start_response_event *ev = (void *)skb->data;
@@ -415,23 +418,27 @@ static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *complete (&ar->vdev_setup_done); } -static void ath10k_wmi_event_vdev_standby_req (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_vdev_standby_req (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_STANDBY_REQ_EVENTID\n" ); } -static void ath10k_wmi_event_vdev_resume_req (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_vdev_resume_req (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_RESUME_REQ_EVENTID\n" ); } -static void ath10k_wmi_event_vdev_stopped (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_vdev_stopped (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_STOPPED_EVENTID\n" );complete (&ar->vdev_setup_done); } -static void ath10k_wmi_event_peer_sta_kickout (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_peer_sta_kickout (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_PEER_STA_KICKOUT_EVENTID\n" ); }
@@ -460,8 +467,10 @@ static void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff* is unicast buffered for stations with aid > 7 and fill it * in ourselves. */ -static void ath10k_wmi_update_tim (struct ath10k *ar,struct ath10k_vif *arvif, -struct sk_buff *bcn,struct wmi_bcn_info *bcn_info) +static void ath10k_wmi_update_tim (struct ath10k *ar, +struct ath10k_vif *arvif, +struct sk_buff *bcn, +struct wmi_bcn_info *bcn_info) {struct ieee80211_hdr *hdr = (void *)bcn->data;struct ieee80211_tim_ie *tim;
@@ -723,7 +732,8 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) } } -static void ath10k_wmi_event_tbttoffset_update (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_tbttoffset_update (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_TBTTOFFSET_UPDATE_EVENTID\n" ); }
@@ -755,7 +765,8 @@ static void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb)ath10k_dbg (ATH10K_DBG_WMI ,"WMI_PDEV_QVIT_EVENTID\n" ); } -static void ath10k_wmi_event_wlan_profile_data (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_wlan_profile_data (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_WLAN_PROFILE_DATA_EVENTID\n" ); }
@@ -772,27 +783,32 @@ static void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,ath10k_dbg (ATH10K_DBG_WMI ,"WMI_TSF_MEASUREMENT_REPORT_EVENTID\n" ); } -static void ath10k_wmi_event_rtt_error_report (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_rtt_error_report (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_RTT_ERROR_REPORT_EVENTID\n" ); } -static void ath10k_wmi_event_wow_wakeup_host (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_wow_wakeup_host (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_WOW_WAKEUP_HOST_EVENTID\n" ); } -static void ath10k_wmi_event_dcs_interference (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_dcs_interference (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_DCS_INTERFERENCE_EVENTID\n" ); } -static void ath10k_wmi_event_pdev_tpc_config (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_pdev_tpc_config (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_PDEV_TPC_CONFIG_EVENTID\n" ); } -static void ath10k_wmi_event_pdev_ftm_intg (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_pdev_ftm_intg (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_PDEV_FTM_INTG_EVENTID\n" ); }
@@ -803,17 +819,20 @@ static void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,ath10k_dbg (ATH10K_DBG_WMI ,"WMI_GTK_OFFLOAD_STATUS_EVENTID\n" ); } -static void ath10k_wmi_event_gtk_rekey_fail (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_gtk_rekey_fail (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_GTK_REKEY_FAIL_EVENTID\n" ); } -static void ath10k_wmi_event_delba_complete (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_delba_complete (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_TX_DELBA_COMPLETE_EVENTID\n" ); } -static void ath10k_wmi_event_addba_complete (struct ath10k *ar,struct sk_buff *skb) +static void ath10k_wmi_event_addba_complete (struct ath10k *ar, +struct sk_buff *skb) {ath10k_dbg (ATH10K_DBG_WMI ,"WMI_TX_ADDBA_COMPLETE_EVENTID\n" ); }
@@ -824,7 +843,8 @@ static void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,ath10k_dbg (ATH10K_DBG_WMI ,"WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\n" ); } -static void ath10k_wmi_service_ready_event_rx (struct ath10k *ar,struct sk_buff *skb) +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;
@@ -839,13 +859,16 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar, struct sk_buff ar->hw_max_tx_power =__le32_to_cpu (ev->hw_max_tx_power); ar->ht_cap_info =__le32_to_cpu (ev->ht_cap_info); ar->vht_cap_info =__le32_to_cpu (ev->vht_cap_info); - ar->fw_version_major = (__le32_to_cpu (ev->sw_version) &0xff000000 ) >>24 ; + ar->fw_version_major = + (__le32_to_cpu (ev->sw_version) &0xff000000 ) >>24 ; ar->fw_version_minor = (__le32_to_cpu (ev->sw_version) &0x00ffffff ); - ar->fw_version_release = (__le32_to_cpu (ev->sw_version_1) &0xffff0000 ) >>16 ; + ar->fw_version_release = + (__le32_to_cpu (ev->sw_version_1) &0xffff0000 ) >>16 ; ar->fw_version_build = (__le32_to_cpu (ev->sw_version_1) &0x0000ffff ); ar->phy_capability =__le32_to_cpu (ev->phy_capability); - common->regulatory.current_rd =__le32_to_cpu (ev->hal_reg_capabilities.eeprom_rd); + common->regulatory.current_rd = +__le32_to_cpu (ev->hal_reg_capabilities.eeprom_rd);ath10k_debug_read_service_map (ar, ev->wmi_service_bitmap,sizeof (ev->wmi_service_bitmap));
@@ -1120,8 +1143,8 @@ int ath10k_wmi_connect_htc_service(struct ath10k *ar) status =ath10k_htc_connect_service (ar->htc, &conn_req, &conn_resp);if (status) { -ath10k_warn ("failed to connect to WMI CONTROL" -" service status: %d\n" , status); +ath10k_warn ("failed to connect to WMI CONTROL service status: %d\n" , + status);return status; }
@@ -1151,7 +1174,8 @@ int ath10k_wmi_pdev_set_regdomain(struct ath10k *ar)return ath10k_wmi_cmd_send (ar, skb,WMI_PDEV_SET_REGDOMAIN_CMDID ); } -int ath10k_wmi_pdev_set_channel (struct ath10k *ar,const struct wmi_channel_arg *arg) +int ath10k_wmi_pdev_set_channel (struct ath10k *ar, +const struct wmi_channel_arg *arg) {struct wmi_set_channel_cmd *cmd;struct sk_buff *skb;
@@ -1380,7 +1404,8 @@ int ath10k_wmi_start_scan(struct ath10k *ar, channels->num_chan =__cpu_to_le32 (arg->n_channels);for (i =0 ; i < arg->n_channels; i++) - channels->channel_list[i] =__cpu_to_le32 (arg->channels[i]); + channels->channel_list[i] = +__cpu_to_le32 (arg->channels[i]); off +=sizeof (*channels); off +=sizeof (__le32) * arg->n_channels;
@@ -1392,8 +1417,11 @@ int ath10k_wmi_start_scan(struct ath10k *ar, ssids->num_ssids =__cpu_to_le32 (arg->n_ssids);for (i =0 ; i < arg->n_ssids; i++) { - ssids->ssids[i].ssid_len =__cpu_to_le32 (arg->ssids[i].len); -memcpy (&ssids->ssids[i].ssid, arg->ssids[i].ssid, arg->ssids[i].len); + ssids->ssids[i].ssid_len = +__cpu_to_le32 (arg->ssids[i].len); +memcpy (&ssids->ssids[i].ssid, + arg->ssids[i].ssid, + arg->ssids[i].len); } off +=sizeof (*ssids);
@@ -1406,7 +1434,9 @@ int ath10k_wmi_start_scan(struct ath10k *ar, bssids->num_bssid =__cpu_to_le32 (arg->n_bssids);for (i =0 ; i < arg->n_bssids; i++) -memcpy (&bssids->bssid_list[i], arg->bssids[i].bssid,ETH_ALEN ); +memcpy (&bssids->bssid_list[i], + arg->bssids[i].bssid, +ETH_ALEN ); off +=sizeof (*bssids); off +=sizeof (struct wmi_mac_addr ) * arg->n_bssids;
@@ -1485,8 +1515,8 @@ int ath10k_wmi_stop_scan(struct ath10k *ar, const struct wmi_stop_scan_arg *arg) cmd->scan_id =__cpu_to_le32 (scan_id); cmd->scan_req_id =__cpu_to_le32 (req_id); -ath10k_dbg (ATH10K_DBG_WMI ,"wmi stop scan reqid %d req_type %d " -"vdev/scan_id %d\n" , +ath10k_dbg (ATH10K_DBG_WMI , +"wmi stop scan reqid %d req_type %d vdev/scan_id %d\n" , arg->req_id, arg->req_type, arg->u.scan_id);return ath10k_wmi_cmd_send (ar, skb,WMI_STOP_SCAN_CMDID ); }
@@ -1603,13 +1633,15 @@ static int ath10k_wmi_vdev_start_restart(struct ath10k *ar,int ath10k_wmi_vdev_start (struct ath10k *ar,const struct wmi_vdev_start_request_arg *arg) { -return ath10k_wmi_vdev_start_restart (ar, arg,WMI_VDEV_START_REQUEST_CMDID ); +return ath10k_wmi_vdev_start_restart (ar, arg, +WMI_VDEV_START_REQUEST_CMDID ); }int ath10k_wmi_vdev_restart (struct ath10k *ar,const struct wmi_vdev_start_request_arg *arg) { -return ath10k_wmi_vdev_start_restart (ar, arg,WMI_VDEV_RESTART_REQUEST_CMDID ); +return ath10k_wmi_vdev_start_restart (ar, arg, +WMI_VDEV_RESTART_REQUEST_CMDID ); }int ath10k_wmi_vdev_stop (struct ath10k *ar,u32 vdev_id)
PATCH 3/5 ath10k: fix some checkpatch warnings in pci.c
In reply to Kalle Valo--- drivers/net/wireless/ath/ath10k/pci.c | 89 ++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 31 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +58 -31
@@ -45,7 +45,8 @@ static DEFINE_PCI_DEVICE_TABLE(ath10k_pci_id_table) = { {0} }; -static int ath10k_pci_diag_read_access (struct ath10k *ar,u32 address,u32 *data); +static int ath10k_pci_diag_read_access (struct ath10k *ar,u32 address, +u32 *data);static void ath10k_pci_process_ce (struct ath10k *ar);static int ath10k_pci_post_recv_buffers (struct ath10k *ar);
@@ -231,20 +232,24 @@ done:if (ret ==0 ) {/* Copy data from allocated DMA buf to caller's buf */ WARN_ON_ONCE (orig_nbytes &3 ); -for (i =0 ; i < orig_nbytes /sizeof (__le32); i++) - ((u32 *)data)[i] =__le32_to_cpu (((__le32 *)data_buf)[i]); +for (i =0 ; i < orig_nbytes /sizeof (__le32); i++) { + ((u32 *)data)[i] = +__le32_to_cpu (((__le32 *)data_buf)[i]); + } }else -ath10k_dbg (ATH10K_DBG_PCI ,"%s failure (0x%x)\n" , __func__, address); +ath10k_dbg (ATH10K_DBG_PCI ,"%s failure (0x%x)\n" , + __func__, address);if (data_buf)pci_free_consistent (ar_pci->pdev, orig_nbytes, - data_buf, ce_data_base); + data_buf, ce_data_base);return ret; }/* Read 4-byte aligned data from Target memory or register */ -static int ath10k_pci_diag_read_access (struct ath10k *ar,u32 address,u32 *data) +static int ath10k_pci_diag_read_access (struct ath10k *ar,u32 address, +u32 *data) {/* Assume range doesn't cross this boundary */ if (address >=DRAM_BASE_ADDRESS )
@@ -324,13 +329,15 @@ static int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address, u8 *data,* Request CE to send caller-supplied data that * was copied to bounce buffer to Target(!) address. */ - ret =ath10k_ce_send (ce_diag,NULL , (u32 ) ce_data, nbytes,0 ,0 ); + ret =ath10k_ce_send (ce_diag,NULL , (u32 ) ce_data, + nbytes,0 ,0 );if (ret !=0 ) goto done; i =0 ;while (ath10k_ce_completed_send_next (ce_diag,NULL , &buf, - &completed_nbytes, &id) !=0 ) { + &completed_nbytes, + &id) !=0 ) {mdelay (1 );if (i++ >DIAG_ACCESS_CE_TIMEOUT_MS ) {
@@ -437,7 +444,8 @@ void ath10k_do_pci_wake(struct ath10k *ar)if (atomic_read (&ar_pci->keep_awake_count) ==0 ) {/* Force AWAKE */ iowrite32 (PCIE_SOC_WAKE_V_MASK , - pci_addr +PCIE_LOCAL_BASE_ADDRESS +PCIE_SOC_WAKE_ADDRESS ); + pci_addr +PCIE_LOCAL_BASE_ADDRESS + +PCIE_SOC_WAKE_ADDRESS ); }atomic_inc (&ar_pci->keep_awake_count);
@@ -451,7 +459,8 @@ void ath10k_do_pci_wake(struct ath10k *ar) }if (tot_delay >PCIE_WAKE_TIMEOUT ) -ath10k_warn ("keep_awake_count %d\n" ,atomic_read (&ar_pci->keep_awake_count)); +ath10k_warn ("keep_awake_count %d\n" , +atomic_read (&ar_pci->keep_awake_count));udelay (curr_delay); tot_delay += curr_delay;
@@ -470,7 +479,8 @@ void ath10k_do_pci_sleep(struct ath10k *ar)/* Allow sleep */ ar_pci->verified_awake = false;iowrite32 (PCIE_SOC_WAKE_RESET , - pci_addr +PCIE_LOCAL_BASE_ADDRESS +PCIE_SOC_WAKE_ADDRESS ); + pci_addr +PCIE_LOCAL_BASE_ADDRESS + +PCIE_SOC_WAKE_ADDRESS ); } }
@@ -854,7 +864,8 @@ static void ath10k_pci_cleanup_ce(struct ath10k *ar) pipe_info = &ar_pci->pipe_info[pipe_num];spin_lock_bh (&pipe_info->pipe_lock); -list_for_each_entry_safe (compl, tmp, &pipe_info->compl_free, list) { +list_for_each_entry_safe (compl, tmp, + &pipe_info->compl_free, list) {list_del (&compl->list);kfree (compl); }
@@ -909,10 +920,9 @@ static void ath10k_pci_process_ce(struct ath10k *ar)skb_trim (skb,0 );skb_put (skb, nbytes); msg_callbacks->rx_completion_handler (ar, skb, - compl->pipe_info->pipe_num); + compl->pipe_info->pipe_num); }else { -ath10k_warn ("%s: rxed more than expected" -" (nbytes %d, max %d)" , +ath10k_warn ("%s: rxed more than expected (nbytes %d, max %d)" , __func__, nbytes, skb->len +skb_tailroom (skb)); }
@@ -928,7 +938,7 @@ static void ath10k_pci_process_ce(struct ath10k *ar) compl->pipe_info->num_sends_allowed += send_done;spin_unlock_bh (&compl->pipe_info->pipe_lock); - }while (1 ); + }while (1 );spin_lock_bh (&ar_pci->compl_lock); ar_pci->compl_processing = false;
@@ -1002,8 +1012,12 @@ static void ath10k_pci_hif_get_default_pipe(struct ath10k *ar, {int ul_is_polled, dl_is_polled; - (void )ath10k_pci_hif_map_service_to_pipe (ar,ATH10K_HTC_SVC_ID_RSVD_CTRL , - ul_pipe, dl_pipe, &ul_is_polled, &dl_is_polled); + (void )ath10k_pci_hif_map_service_to_pipe (ar, +ATH10K_HTC_SVC_ID_RSVD_CTRL , + ul_pipe, + dl_pipe, + &ul_is_polled, + &dl_is_polled); } static int ath10k_pci_post_recv_buffers_pipe(struct hif_ce_pipe_info *pipe_info,
@@ -1022,7 +1036,8 @@ static int ath10k_pci_post_recv_buffers_pipe(struct hif_ce_pipe_info *pipe_info,for (i =0 ; i < num; i++) { skb =dev_alloc_skb (pipe_info->buf_sz);if (!skb) { -ath10k_warn ("%s: Memory allocation failure\n" , __func__); +ath10k_warn ("%s: Memory allocation failure\n" , + __func__);return -ENOMEM ; }
@@ -1044,7 +1059,8 @@ static int ath10k_pci_post_recv_buffers_pipe(struct hif_ce_pipe_info *pipe_info, pipe_info->buf_sz, PCI_DMA_FROMDEVICE); - ret =ath10k_ce_recv_buf_enqueue (ce_state, (void *)skb, ce_data); + ret =ath10k_ce_recv_buf_enqueue (ce_state, (void *)skb, + ce_data);if (ret)break ;/* FIXME: Handle error */ }
@@ -1250,7 +1266,8 @@ static int ath10k_pci_hif_exchange_bmi_msg(struct ath10k *ar, goto err_req; } - resp_paddr =dma_map_single (ar->dev, tresp, *resp_len,DMA_FROM_DEVICE ); + resp_paddr =dma_map_single (ar->dev, tresp, *resp_len, +DMA_FROM_DEVICE ); ret =dma_mapping_error (ar->dev, resp_paddr);if (ret) goto err_req;
@@ -1267,7 +1284,8 @@ static int ath10k_pci_hif_exchange_bmi_msg(struct ath10k *ar,if (ret) goto err_resp; - ret =wait_for_completion_timeout (&xfer.done,BMI_COMMUNICATION_TIMEOUT_HZ ); + ret =wait_for_completion_timeout (&xfer.done, +BMI_COMMUNICATION_TIMEOUT_HZ );if (ret <=0 ) {u32 unused_buffer;unsigned int unused_nbytes;
@@ -1286,7 +1304,8 @@ err_resp:u32 unused_buffer;ath10k_ce_revoke_recv_next (ce_rx,NULL , &unused_buffer); -dma_unmap_single (ar->dev, resp_paddr, *resp_len,DMA_FROM_DEVICE ); +dma_unmap_single (ar->dev, resp_paddr, + *resp_len,DMA_FROM_DEVICE ); } err_req:dma_unmap_single (ar->dev, req_paddr, req_len,DMA_TO_DEVICE );
@@ -1473,7 +1492,8 @@ static int ath10k_pci_init_config(struct ath10k *ar)int ret =0 ;/* Download to Target the CE Config and the service-to-CE map */ - interconnect_targ_addr =host_interest_item_address (HI_ITEM (hi_interconnect_state)); + interconnect_targ_addr = +host_interest_item_address (HI_ITEM (hi_interconnect_state));/* Supply Target-side CE configuration */ ret = ath10k_pci_diag_read_access(ar, interconnect_targ_addr,
@@ -1490,7 +1510,8 @@ static int ath10k_pci_init_config(struct ath10k *ar) } ret =ath10k_pci_diag_read_access (ar, pcie_state_targ_addr + - offsetof(struct pcie_state , pipe_cfg_addr), + offsetof(struct pcie_state , + pipe_cfg_addr), &pipe_cfg_targ_addr);if (ret !=0 ) {ath10k_err ("Failed to get pipe cfg addr: %d\n" , ret);
@@ -1513,7 +1534,8 @@ static int ath10k_pci_init_config(struct ath10k *ar) } ret =ath10k_pci_diag_read_access (ar, pcie_state_targ_addr + - offsetof(struct pcie_state , svc_to_pipe_map), + offsetof(struct pcie_state , + svc_to_pipe_map), &svc_to_pipe_map);if (ret !=0 ) {ath10k_err ("Failed to get svc/pipe map: %d\n" , ret);
@@ -1535,7 +1557,8 @@ static int ath10k_pci_init_config(struct ath10k *ar) } ret =ath10k_pci_diag_read_access (ar, pcie_state_targ_addr + - offsetof(struct pcie_state , config_flags), + offsetof(struct pcie_state , + config_flags), &pcie_config_flags);if (ret !=0 ) {ath10k_err ("Failed to get pcie config_flags: %d\n" , ret);
@@ -1654,7 +1677,8 @@ static void ath10k_pci_fw_interrupt_handler(struct ath10k *ar)if (fw_indicator &FW_IND_EVENT_PENDING ) {/* ACK: clear Target-side pending event */ -ath10k_pci_write32 (ar, fw_indicator_address, fw_indicator & ~FW_IND_EVENT_PENDING ); +ath10k_pci_write32 (ar, fw_indicator_address, + fw_indicator & ~FW_IND_EVENT_PENDING );ath10k_pci_sleep (ar);if (ar_pci->started)
@@ -1929,7 +1953,8 @@ static int ath10k_pci_start_intr(struct ath10k *ar)if (ret ==0 ) goto exit; -ath10k_warn ("MSI didn't succeed (%d), trying legacy INTR\n" , ret); +ath10k_warn ("MSI didn't succeed (%d), trying legacy INTR\n" , + ret); num =0 ; }
@@ -2010,7 +2035,8 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)if (!mem)return ; -ath10k_pci_reg_write32 (mem,PCIE_SOC_WAKE_ADDRESS ,PCIE_SOC_WAKE_V_MASK ); +ath10k_pci_reg_write32 (mem,PCIE_SOC_WAKE_ADDRESS , +PCIE_SOC_WAKE_V_MASK );for (i =0 ; i <ATH_PCI_RESET_WAIT_MAX ; i++) {if (ath10k_pci_target_is_awake (ar))break ;
@@ -2310,7 +2336,8 @@ static int ath10k_pci_suspend(struct device *device) 1 * HZ);if (!left) { -ath10k_warn ("failed to receive target pasused event [left=%d]\n" , left); +ath10k_warn ("failed to receive target pasused event [left=%d]\n" , + left);return -EIO ; }
PATCH 4/5 ath10k: fix some checkpatch errors in ce.c
In reply to Kalle Valo--- drivers/net/wireless/ath/ath10k/ce.c | 80 ++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 28 deletions(-)
drivers/net/wireless/ath/ath10k/ce.c +52 -28
@@ -121,7 +121,7 @@ static inline u32 ath10k_ce_src_ring_read_index_get(struct ath10k *ar,return ath10k_pci_read32 (ar, ce_ctrl_addr +CURRENT_SRRI_ADDRESS ); } -static inline void ath10k_ce_src_ring_base_addr_set (struct ath10k * ar, +static inline void ath10k_ce_src_ring_base_addr_set (struct ath10k *ar,u32 ce_ctrl_addr,unsigned int addr) {
@@ -139,10 +139,12 @@ static inline void ath10k_ce_src_ring_dmax_set(struct ath10k *ar, u32 ce_ctrl_addr, unsigned int n) { -u32 ctrl1_addr =ath10k_pci_read32 ((ar), (ce_ctrl_addr) +CE_CTRL1_ADDRESS ); +u32 ctrl1_addr =ath10k_pci_read32 ((ar), + (ce_ctrl_addr) +CE_CTRL1_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +CE_CTRL1_ADDRESS , - (ctrl1_addr & ~CE_CTRL1_DMAX_LENGTH_MASK ) |CE_CTRL1_DMAX_LENGTH_SET (n)); + (ctrl1_addr & ~CE_CTRL1_DMAX_LENGTH_MASK ) | +CE_CTRL1_DMAX_LENGTH_SET (n)); } static inline void ath10k_ce_src_ring_byte_swap_set(struct ath10k *ar,
@@ -153,7 +155,8 @@ static inline void ath10k_ce_src_ring_byte_swap_set(struct ath10k *ar,u32 ctrl1_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +CE_CTRL1_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +CE_CTRL1_ADDRESS , - (ctrl1_addr & ~CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK ) |CE_CTRL1_SRC_RING_BYTE_SWAP_EN_SET (n)); + (ctrl1_addr & ~CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK ) | +CE_CTRL1_SRC_RING_BYTE_SWAP_EN_SET (n)); } static inline void ath10k_ce_dest_ring_byte_swap_set(struct ath10k *ar,
@@ -163,7 +166,8 @@ static inline void ath10k_ce_dest_ring_byte_swap_set(struct ath10k *ar,u32 ctrl1_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +CE_CTRL1_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +CE_CTRL1_ADDRESS , - (ctrl1_addr & ~CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK ) |CE_CTRL1_DST_RING_BYTE_SWAP_EN_SET (n)); + (ctrl1_addr & ~CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK ) | +CE_CTRL1_DST_RING_BYTE_SWAP_EN_SET (n)); } static inline u32 ath10k_ce_dest_ring_read_index_get(struct ath10k *ar,
@@ -190,46 +194,55 @@ static inline void ath10k_ce_src_ring_highmark_set(struct ath10k *ar, u32 ce_ctrl_addr, unsigned int n) { -u32 watermark_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +SRC_WATERMARK_ADDRESS ); +u32 watermark_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +SRC_WATERMARK_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +SRC_WATERMARK_ADDRESS , - (watermark_addr & ~SRC_WATERMARK_HIGH_MASK ) |SRC_WATERMARK_HIGH_SET (n)); + (watermark_addr & ~SRC_WATERMARK_HIGH_MASK ) | +SRC_WATERMARK_HIGH_SET (n)); }static inline void ath10k_ce_src_ring_lowmark_set (struct ath10k *ar,u32 ce_ctrl_addr,unsigned int n) { -u32 watermark_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +SRC_WATERMARK_ADDRESS ); +u32 watermark_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +SRC_WATERMARK_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +SRC_WATERMARK_ADDRESS , - (watermark_addr & ~SRC_WATERMARK_LOW_MASK ) |SRC_WATERMARK_LOW_SET (n)); + (watermark_addr & ~SRC_WATERMARK_LOW_MASK ) | +SRC_WATERMARK_LOW_SET (n)); }static inline void ath10k_ce_dest_ring_highmark_set (struct ath10k *ar,u32 ce_ctrl_addr,unsigned int n) { -u32 watermark_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +DST_WATERMARK_ADDRESS ); +u32 watermark_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +DST_WATERMARK_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +DST_WATERMARK_ADDRESS , - (watermark_addr & ~DST_WATERMARK_HIGH_MASK ) |DST_WATERMARK_HIGH_SET (n)); + (watermark_addr & ~DST_WATERMARK_HIGH_MASK ) | +DST_WATERMARK_HIGH_SET (n)); }static inline void ath10k_ce_dest_ring_lowmark_set (struct ath10k *ar,u32 ce_ctrl_addr,unsigned int n) { -u32 watermark_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +DST_WATERMARK_ADDRESS ); +u32 watermark_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +DST_WATERMARK_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +DST_WATERMARK_ADDRESS , - (watermark_addr & ~DST_WATERMARK_LOW_MASK ) |DST_WATERMARK_LOW_SET (n)); + (watermark_addr & ~DST_WATERMARK_LOW_MASK ) | +DST_WATERMARK_LOW_SET (n)); }static inline void ath10k_ce_copy_complete_inter_enable (struct ath10k *ar,u32 ce_ctrl_addr) { -u32 host_ie_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS ); +u32 host_ie_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +HOST_IE_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS , host_ie_addr |HOST_IE_COPY_COMPLETE_MASK );
@@ -238,7 +251,8 @@ static inline void ath10k_ce_copy_complete_inter_enable(struct ath10k *ar,static inline void ath10k_ce_copy_complete_intr_disable (struct ath10k *ar,u32 ce_ctrl_addr) { -u32 host_ie_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS ); +u32 host_ie_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +HOST_IE_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS , host_ie_addr & ~HOST_IE_COPY_COMPLETE_MASK );
@@ -247,7 +261,8 @@ static inline void ath10k_ce_copy_complete_intr_disable(struct ath10k *ar,static inline void ath10k_ce_watermark_intr_diable (struct ath10k *ar,u32 ce_ctrl_addr) { -u32 host_ie_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS ); +u32 host_ie_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +HOST_IE_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +HOST_IE_ADDRESS , host_ie_addr & ~CE_WATERMARK_MASK );
@@ -256,7 +271,8 @@ static inline void ath10k_ce_watermark_intr_diable(struct ath10k *ar,static inline void ath10k_ce_error_intr_enable (struct ath10k *ar,u32 ce_ctrl_addr) { -u32 misc_ie_addr =ath10k_pci_read32 (ar, ce_ctrl_addr +MISC_IE_ADDRESS ); +u32 misc_ie_addr =ath10k_pci_read32 (ar, + ce_ctrl_addr +MISC_IE_ADDRESS );ath10k_pci_write32 (ar, ce_ctrl_addr +MISC_IE_ADDRESS , misc_ie_addr |CE_ERROR_MASK );
@@ -304,7 +320,8 @@ static int ath10k_ce_send_nolock(struct ce_state *ce_state, goto exit; } - desc =CE_SRC_RING_TO_DESC (src_ring->base_addr_owner_space, write_index); + desc =CE_SRC_RING_TO_DESC (src_ring->base_addr_owner_space, + write_index); sdesc =CE_SRC_RING_TO_DESC (src_ring->shadow_base, write_index); desc_flags |=SM (transfer_id,CE_DESC_FLAGS_META_DATA );
@@ -397,7 +414,8 @@ int ath10k_ce_sendlist_send(struct ce_state *ce_state,CE_SENDLIST_ITEM_CTXT , (u32 ) item->data, item->u.nbytes, transfer_id, - item->flags | CE_SEND_FLAG_GATHER); + item->flags | + CE_SEND_FLAG_GATHER);if (ret)ath10k_warn ("CE send failed for item: %d\n" , i); }
@@ -621,7 +639,8 @@ static int ath10k_ce_completed_send_next_nolock(struct ce_state *ce_state,* value of the HW index has become stale. */ ath10k_pci_wake (ar); - src_ring->hw_index =ath10k_ce_src_ring_read_index_get (ar, ctrl_addr); + src_ring->hw_index = +ath10k_ce_src_ring_read_index_get (ar, ctrl_addr);ath10k_pci_sleep (ar); } read_index = src_ring->hw_index;
@@ -751,7 +770,8 @@ void ath10k_ce_per_engine_service(struct ath10k *ar, unsigned int ce_id)spin_lock_bh (&ar_pci->ce_lock);/* Clear the copy-complete interrupts that will be handled here. */ -ath10k_ce_engine_int_status_clear (ar, ctrl_addr,HOST_IS_COPY_COMPLETE_MASK ); +ath10k_ce_engine_int_status_clear (ar, ctrl_addr, +HOST_IS_COPY_COMPLETE_MASK );if (ce_state->recv_cb) {/*
@@ -944,8 +964,9 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar,*/ src_ring->base_addr_owner_space_unaligned =pci_alloc_consistent (ar_pci->pdev, - (nentries *sizeof (struct ce_desc ) +CE_DESC_RING_ALIGN ), - &base_addr); + (nentries *sizeof (struct ce_desc ) + +CE_DESC_RING_ALIGN ), + &base_addr); src_ring->base_addr_ce_space_unaligned = base_addr;
@@ -977,7 +998,8 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar, CE_DESC_RING_ALIGN - 1) & ~(CE_DESC_RING_ALIGN - 1));ath10k_pci_wake (ar); -ath10k_ce_src_ring_base_addr_set (ar, ctrl_addr, src_ring->base_addr_ce_space); +ath10k_ce_src_ring_base_addr_set (ar, ctrl_addr, + src_ring->base_addr_ce_space);ath10k_ce_src_ring_size_set (ar, ctrl_addr, nentries);ath10k_ce_src_ring_dmax_set (ar, ctrl_addr, attr->src_sz_max);ath10k_ce_src_ring_byte_swap_set (ar, ctrl_addr,0 );
@@ -1020,7 +1042,8 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,ath10k_pci_wake (ar); dest_ring->sw_index =ath10k_ce_dest_ring_read_index_get (ar, ctrl_addr); - dest_ring->write_index =ath10k_ce_dest_ring_write_index_get (ar, ctrl_addr); + dest_ring->write_index = +ath10k_ce_dest_ring_write_index_get (ar, ctrl_addr);ath10k_pci_sleep (ar); dest_ring->per_transfer_context = (void **)ptr;
@@ -1031,8 +1054,9 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,*/ dest_ring->base_addr_owner_space_unaligned =pci_alloc_consistent (ar_pci->pdev, - (nentries *sizeof (struct ce_desc ) +CE_DESC_RING_ALIGN ), - &base_addr); + (nentries *sizeof (struct ce_desc ) + +CE_DESC_RING_ALIGN ), + &base_addr); dest_ring->base_addr_ce_space_unaligned = base_addr;/*
@@ -1060,7 +1084,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,ath10k_pci_wake (ar);ath10k_ce_dest_ring_base_addr_set (ar, ctrl_addr, - dest_ring->base_addr_ce_space); + dest_ring->base_addr_ce_space);ath10k_ce_dest_ring_size_set (ar, ctrl_addr, nentries);ath10k_ce_dest_ring_byte_swap_set (ar, ctrl_addr,0 );ath10k_ce_dest_ring_lowmark_set (ar, ctrl_addr,0 );
PATCH 5/5 ath10k: fix some checkpatch errors in wmi.h
In reply to Kalle Valo--- drivers/net/wireless/ath/ath10k/wmi.h | 155 ++++++++++++++++++++++++--------- 1 file changed, 111 insertions(+), 44 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.h +111 -44
@@ -188,8 +188,8 @@ struct wmi_mac_addr {*/ enum wmi_cmd_group {/* 0 to 2 are reserved */ -WMI_GRP_START =0x3 , -WMI_GRP_SCAN =WMI_GRP_START , +WMI_GRP_START =0x3 , +WMI_GRP_SCAN =WMI_GRP_START ,WMI_GRP_PDEV ,WMI_GRP_VDEV ,WMI_GRP_PEER ,
@@ -223,7 +223,7 @@ enum wmi_cmd_group {/* Command IDs and commande events. */ enum wmi_cmd_id { -WMI_INIT_CMDID =0x1 , +WMI_INIT_CMDID =0x1 ,/* Scan specific commands */ WMI_START_SCAN_CMDID =WMI_CMD_GRP_START_ID (WMI_GRP_SCAN ),
@@ -318,7 +318,8 @@ enum wmi_cmd_id {WMI_AP_PS_PEER_UAPSD_COEX_CMDID ,/* Rate-control specific commands */ -WMI_PEER_RATE_RETRY_SCHED_CMDID =WMI_CMD_GRP_START_ID (WMI_GRP_RATE_CTRL ), +WMI_PEER_RATE_RETRY_SCHED_CMDID = +WMI_CMD_GRP_START_ID (WMI_GRP_RATE_CTRL ),/* WLAN Profiling commands. */ WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
@@ -384,7 +385,7 @@ enum wmi_cmd_id { };enum wmi_event_id { -WMI_SERVICE_READY_EVENTID =0x1 , +WMI_SERVICE_READY_EVENTID =0x1 ,WMI_READY_EVENTID ,/* Scan specific events */
@@ -527,7 +528,9 @@ enum wmi_channel_change_cause {#define WMI_CHAN_FLAG_DFS (1 << 10)#define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)#define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12) -#define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)/* Indicate reason for channel switch */ + +/* Indicate reason for channel switch */ +#define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)#define WMI_MAX_SPATIAL_STREAM 3
@@ -745,10 +748,11 @@ struct wmi_resource_config {__le32 num_peers;/* -* In offload mode target supports features like WOW, chatter and other -* protocol offloads. In order to support them some functionalities like -* reorder buffering, PN checking need to be done in target. This determines -* maximum number of peers suported by target in offload mode +* In offload mode target supports features like WOW, chatter and +* other protocol offloads. In order to support them some +* functionalities like reorder buffering, PN checking need to be +* done in target. This determines maximum number of peers suported +* by target in offload mode */ __le32 num_offload_peers;
@@ -1639,52 +1643,109 @@ struct wmi_pdev_set_wmm_params_arg { };struct wal_dbg_tx_stats { -__le32 comp_queued;/* Num HTT cookies queued to dispatch list */ -__le32 comp_delivered;/* Num HTT cookies dispatched */ -__le32 msdu_enqued;/* Num MSDU queued to WAL */ -__le32 mpdu_enqued;/* Num MPDU queue to WAL */ -__le32 wmm_drop;/* Num MSDUs dropped by WMM limit */ -__le32 local_enqued;/* Num Local frames queued */ -__le32 local_freed;/* Num Local frames done */ -__le32 hw_queued;/* Num queued to HW */ -__le32 hw_reaped;/* Num PPDU reaped from HW */ -__le32 underrun;/* Num underruns */ -__le32 tx_abort;/* Num PPDUs cleaned up in TX abort */ -__le32 mpdus_requed;/* Num MPDUs requed by SW */ -__le32 tx_ko;/* excessive retries */ -__le32 data_rc;/* data hw rate code */ -__le32 self_triggers;/* Scheduler self triggers */ -__le32 sw_retry_failure;/* frames dropped due to excessive sw retries */ -__le32 illgl_rate_phy_err;/* illegal rate phy errors */ -__le32 pdev_cont_xretry;/* wal pdev continous xretry */ -__le32 pdev_tx_timeout;/* wal pdev continous xretry */ -__le32 pdev_resets;/* wal pdev resets */ +/* Num HTT cookies queued to dispatch list */ +__le32 comp_queued; + +/* Num HTT cookies dispatched */ +__le32 comp_delivered; + +/* Num MSDU queued to WAL */ +__le32 msdu_enqued; + +/* Num MPDU queue to WAL */ +__le32 mpdu_enqued; + +/* Num MSDUs dropped by WMM limit */ +__le32 wmm_drop; + +/* Num Local frames queued */ +__le32 local_enqued; + +/* Num Local frames done */ +__le32 local_freed; + +/* Num queued to HW */ +__le32 hw_queued; + +/* Num PPDU reaped from HW */ +__le32 hw_reaped; + +/* Num underruns */ +__le32 underrun; + +/* Num PPDUs cleaned up in TX abort */ +__le32 tx_abort; + +/* Num MPDUs requed by SW */ +__le32 mpdus_requed; + +/* excessive retries */ +__le32 tx_ko; + +/* data hw rate code */ +__le32 data_rc; + +/* Scheduler self triggers */ +__le32 self_triggers; + +/* frames dropped due to excessive sw retries */ +__le32 sw_retry_failure; + +/* illegal rate phy errors */ +__le32 illgl_rate_phy_err; + +/* wal pdev continous xretry */ +__le32 pdev_cont_xretry; + +/* wal pdev continous xretry */ +__le32 pdev_tx_timeout; + +/* wal pdev resets */ +__le32 pdev_resets; +__le32 phy_underrun; -__le32 txop_ovf;/* MPDU is more than txop limit */ + +/* MPDU is more than txop limit */ +__le32 txop_ovf; } __packed;struct wal_dbg_rx_stats { -__le32 mid_ppdu_route_change;/* Cnts any change in ring routing mid-ppdu */ -__le32 status_rcvd;/* Total number of statuses processed */ +/* Cnts any change in ring routing mid-ppdu */ +__le32 mid_ppdu_route_change; + +/* Total number of statuses processed */ +__le32 status_rcvd; +/* Extra frags on rings 0-3 */ __le32 r0_frags;__le32 r1_frags;__le32 r2_frags;__le32 r3_frags; +/* MSDUs / MPDUs delivered to HTT */ __le32 htt_msdus;__le32 htt_mpdus; +/* MSDUs / MPDUs delivered to local stack */ __le32 loc_msdus;__le32 loc_mpdus; -__le32 oversize_amsdu;/* AMSDUs that have more MSDUs than the status ring size */ -__le32 phy_errs;/* Number of PHY errors */ -__le32 phy_err_drop;/* Number of PHY errors drops */ -__le32 mpdu_errs;/* Number of mpdu errors - FCS, MIC, ENC etc. */ + +/* AMSDUs that have more MSDUs than the status ring size */ +__le32 oversize_amsdu; + +/* Number of PHY errors */ +__le32 phy_errs; + +/* Number of PHY errors drops */ +__le32 phy_err_drop; + +/* Number of mpdu errors - FCS, MIC, ENC etc. */ +__le32 mpdu_errs; } __packed;struct wal_dbg_peer_stats { -__le32 dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ +/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ +__le32 dummy; } __packed;struct wal_dbg_stats {
@@ -1709,8 +1770,11 @@ struct wmi_request_stats_cmd {/* Suspend option */ enum { -WMI_PDEV_SUSPEND ,/* suspend */ -WMI_PDEV_SUSPEND_AND_DISABLE_INTR ,/* suspend and disable all interrupts */ +/* suspend */ +WMI_PDEV_SUSPEND , + +/* suspend and disable all interrupts */ +WMI_PDEV_SUSPEND_AND_DISABLE_INTR , };struct wmi_pdev_suspend_cmd {
@@ -2804,7 +2868,8 @@ int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,int ath10k_wmi_cmd_init (struct ath10k *ar);int ath10k_wmi_start_scan (struct ath10k *ar,const struct wmi_start_scan_arg *);void ath10k_wmi_start_scan_init (struct ath10k *ar,struct wmi_start_scan_arg *); -int ath10k_wmi_stop_scan (struct ath10k *ar,const struct wmi_stop_scan_arg *arg); +int ath10k_wmi_stop_scan (struct ath10k *ar, +const struct wmi_stop_scan_arg *arg); int ath10k_wmi_vdev_create(struct ath10k *ar, u32 vdev_id, enum wmi_vdev_type type, enum wmi_vdev_subtype subtype,
@@ -2815,7 +2880,8 @@ int ath10k_wmi_vdev_start(struct ath10k *ar,int ath10k_wmi_vdev_restart (struct ath10k *ar,const struct wmi_vdev_start_request_arg *);int ath10k_wmi_vdev_stop (struct ath10k *ar,u32 vdev_id); -int ath10k_wmi_vdev_up (struct ath10k *ar,u32 vdev_id,u32 aid,const u8 *bssid); +int ath10k_wmi_vdev_up (struct ath10k *ar,u32 vdev_id,u32 aid, +const u8 *bssid);int ath10k_wmi_vdev_down (struct ath10k *ar,u32 vdev_id);int ath10k_wmi_vdev_set_param (struct ath10k *ar,u32 vdev_id,enum wmi_vdev_param param_id,u32 param_value);
@@ -2827,8 +2893,9 @@ int ath10k_wmi_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 peer_addr[ETH_ALEN]);int ath10k_wmi_peer_flush (struct ath10k *ar,u32 vdev_id,const u8 peer_addr[ETH_ALEN ],u32 tid_bitmap); -int ath10k_wmi_peer_set_param (struct ath10k *ar,u32 vdev_id,const u8 *peer_addr, -enum wmi_peer_param param_id,u32 param_value); +int ath10k_wmi_peer_set_param (struct ath10k *ar,u32 vdev_id, +const u8 *peer_addr, +enum wmi_peer_param param_id,u32 param_value);int ath10k_wmi_peer_assoc (struct ath10k *ar,const struct wmi_peer_assoc_complete_arg *arg); int ath10k_wmi_set_psmode(struct ath10k *ar, u32 vdev_id,
Kalle Valo
Appliedcover ath10k: fix checkpatch warnings 20130426
In reply to Kalle ValoQuoted 10 lines · Kalle Valo
Trying to get the number of checkpatch warnings smaller.
---
Kalle Valo (5):
ath10k: fix checkpatch warnings inmac.c
ath10k: fix some checkpatch warnings inwmi.c
ath10k: fix some checkpatch warnings inpci.c
ath10k: fix some checkpatch errors ince.c
ath10k: fix some checkpatch errors inwmi.h
Applied.
Signature · 1 line
Kalle Valo