ath6kl: neatening
Subsystems (3)
cover ath6kl: neatening
Joe Perches (3):
ath6kl: Add missing newlines and coalesce messages
ath6kl: Remove __func__ uses from ath6kl_err
ath6kl: cfg80211: Add and use ath6kl_cfg80211_ready helper
drivers/net/wireless/ath/ath6kl/bmi.c | 2 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 230 ++++++++------------------- drivers/net/wireless/ath/ath6kl/debug.c | 2 +- drivers/net/wireless/ath/ath6kl/htc.c | 15 +- drivers/net/wireless/ath/ath6kl/htc_hif.c | 3 +- drivers/net/wireless/ath/ath6kl/init.c | 79 ++++------ drivers/net/wireless/ath/ath6kl/main.c | 16 +- drivers/net/wireless/ath/ath6kl/txrx.c | 53 +++---- drivers/net/wireless/ath/ath6kl/wmi.c | 29 ++-- 9 files changed, 155 insertions(+), 274 deletions(-)
Signature · 6 lines
1.7.6.131.g99019 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/3 ath6kl: Add missing newlines and coalesce messages
Logging messages should end in newlines.
Multiple ath6kl_dbg uses should be coalesced where possible. Convert two otherwise identical format strings to the same case to save some space.
Use __func__ in a couple of places as appropriate.
--- drivers/net/wireless/ath/ath6kl/cfg80211.c | 13 +++++++------ drivers/net/wireless/ath/ath6kl/debug.c | 2 +- drivers/net/wireless/ath/ath6kl/htc.c | 18 ++++++++---------- drivers/net/wireless/ath/ath6kl/init.c | 5 ++--- drivers/net/wireless/ath/ath6kl/txrx.c | 16 ++++++++++------ drivers/net/wireless/ath/ath6kl/wmi.c | 21 +++++++++++---------- 6 files changed, 39 insertions(+), 36 deletions(-)
drivers/net/wireless/ath/ath6kl/cfg80211.c +7 -6
@@ -360,8 +360,9 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: connect called with authmode %d dot11 auth %d" -" PW crypto %d PW crypto Len %d GRP crypto %d" -" GRP crypto Len %d channel hint %u\n" , __func__, +" PW crypto %d PW crypto len %d GRP crypto %d" +" GRP crypto len %d channel hint %u\n" , + __func__, ar->auth_mode, ar->dot11_auth_mode, ar->prwise_crypto, ar->prwise_crypto_len, ar->grp_crypto, ar->grp_crpto_len, ar->ch_hint);
@@ -929,8 +930,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,del_timer (&ar->disconnect_timer);ath6kl_dbg (ATH6KL_DBG_WLAN_CFG , -"%s: index %d, key_len %d, key_type 0x%x," -" key_usage 0x%x, seq_len %d\n" , +"%s: index %d, key_len %d, key_type 0x%x, key_usage 0x%x, seq_len %d\n" , __func__, key_index, key->key_len, key_type, key_usage, key->seq_len);
@@ -1348,7 +1348,8 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: connect called with authmode %d dot11 auth %d" " PW crypto %d PW crypto len %d GRP crypto %d" -" GRP crypto len %d channel hint %u\n" , __func__, +" GRP crypto len %d channel hint %u\n" , + __func__, ar->auth_mode, ar->dot11_auth_mode, ar->prwise_crypto, ar->prwise_crypto_len, ar->grp_crypto, ar->grp_crpto_len, ar->ch_hint);
@@ -1534,7 +1535,7 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev, sinfo->txrate.flags |=RATE_INFO_FLAGS_40_MHZ_WIDTH ; sinfo->txrate.flags |=RATE_INFO_FLAGS_MCS ; }else { -ath6kl_warn ("%s: invalid rate: %d" , __func__, rate); +ath6kl_warn ("%s: invalid rate: %d\n" , __func__, rate);return 0 ; }
drivers/net/wireless/ath/ath6kl/debug.c +1 -1
@@ -97,7 +97,7 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,ath6kl_dbg (ATH6KL_DBG_ANY ,"Counter Int status Enable: 0x%x\n" , irq_enable_reg->cntr_int_status_en); } -ath6kl_dbg (ATH6KL_DBG_ANY ,"<------------------------------->" ); +ath6kl_dbg (ATH6KL_DBG_ANY ,"<------------------------------->\n" ); }static void dump_cred_dist (struct htc_endpoint_credit_dist *ep_dist)
drivers/net/wireless/ath/ath6kl/htc.c +8 -10
@@ -81,8 +81,8 @@ static void htc_tx_comp_update(struct htc_target *target,if (!packet->status)return ; -ath6kl_err ("htc_tx_comp_update: req failed " -"(status:%d, ep:%d, len:%d creds:%d)\n" , +ath6kl_err ("%s: req failed (status:%d, ep:%d, len:%d creds:%d)\n" , + __func__, packet->status, packet->endpoint, packet->act_len, packet->info.tx.cred_used);
@@ -176,9 +176,8 @@ static int htc_issue_send(struct htc_target *target, struct htc_packet *packet) send_len = packet->act_len +HTC_HDR_LENGTH ; -ath6kl_dbg (ATH6KL_DBG_HTC_SEND , -"htc_issue_send: transmit len : %d (%s)\n" , - send_len, sync ?"sync" :"async" ); +ath6kl_dbg (ATH6KL_DBG_HTC_SEND ,"%s: transmit len : %d (%s)\n" , + __func__, send_len, sync ?"sync" :"async" ); padded_len =CALC_TXRX_PADDED_LEN (target->dev, send_len);
@@ -233,8 +232,8 @@ static int htc_check_credits(struct htc_target *target,if (ep->cred_dist.credits < *req_cred) {ath6kl_dbg (ATH6KL_DBG_HTC_SEND , -"not enough credits for ep %d leaving " -"packet in queue\n" , eid); +"not enough credits for ep %d - leaving packet in queue\n" , + eid);return -EINVAL ; } }
@@ -907,9 +906,8 @@ static int dev_rx_pkt(struct htc_target *target, struct htc_packet *packet, padded_len =CALC_TXRX_PADDED_LEN (dev, rx_len);if (padded_len > packet->buf_len) { -ath6kl_err ("dev_rx_pkt, not enough space for padlen:%d " -"recvlen:%d bufferlen:%d\n" , - padded_len, rx_len, packet->buf_len); +ath6kl_err ("%s: not enough space for padlen:%d recvlen:%d bufferlen:%d\n" , + __func__, padded_len, rx_len, packet->buf_len);return -ENOMEM ; }
drivers/net/wireless/ath/ath6kl/init.c +2 -3
@@ -347,9 +347,8 @@ static int ath6kl_set_htc_params(struct ath6kl *ar, u32 mbox_isr_yield_val, (u8 *)&mbox_isr_yield_val, 4);if (status) { -ath6kl_err ("%s: bmi_write_memory for yield " -"limit failed\n" , - __func__); +ath6kl_err ("%s: bmi_write_memory for yield limit failed\n" , + __func__); goto out; } }
drivers/net/wireless/ath/ath6kl/txrx.c +10 -6
@@ -541,10 +541,6 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue)if (!status && (packet->act_len != skb->len)) goto fatal; -ath6kl_dbg (ATH6KL_DBG_WLAN_TX , -"%s: skb=0x%p data=0x%p len=0x%x eid=%d " , - __func__, skb, packet->buf, packet->act_len, eid); - ar->tx_pending[eid]--;if (eid != ar->ctrl_ep)
@@ -568,8 +564,16 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue)if (status != -ENOSPC )ath6kl_err ("%s: tx error, status: 0x%x\n" , __func__, status); +ath6kl_dbg (ATH6KL_DBG_WLAN_TX , +"%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , + __func__, skb, packet->buf, packet->act_len, + eid,"error!" ); }else { -ath6kl_dbg (ATH6KL_DBG_WLAN_TX ,"OK\n" ); +ath6kl_dbg (ATH6KL_DBG_WLAN_TX , +"%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , + __func__, skb, packet->buf, packet->act_len, + eid,"OK" ); + flushing = false; ar->net_stats.tx_packets++; ar->net_stats.tx_bytes += skb->len;
@@ -640,7 +644,7 @@ static void ath6kl_alloc_netbufs(struct sk_buff_head *q, u16 num)while (num) { skb =ath6kl_buf_alloc (ATH6KL_BUFFER_SIZE );if (!skb) { -ath6kl_err ("%s: netbuf allocation failed" , __func__); +ath6kl_err ("%s: netbuf allocation failed\n" , __func__);return ; }skb_queue_tail (q, skb);
drivers/net/wireless/ath/ath6kl/wmi.c +11 -10
@@ -570,11 +570,11 @@ static int ath6kl_wmi_peer_node_event_rx(struct wmi *wmi, u8 *datap, int len) ev = (struct wmi_peer_node_event *) datap;if (ev->event_code ==PEER_NODE_JOIN_EVENT ) -ath6kl_dbg (ATH6KL_DBG_WMI ,"joined node with mac addr: %pM" , - ev->peer_mac_addr); +ath6kl_dbg (ATH6KL_DBG_WMI ,"joined node with mac addr: %pM\n" , + ev->peer_mac_addr);else if (ev->event_code ==PEER_NODE_LEAVE_EVENT ) -ath6kl_dbg (ATH6KL_DBG_WMI ,"left node with mac addr: %pM" , - ev->peer_mac_addr); +ath6kl_dbg (ATH6KL_DBG_WMI ,"left node with mac addr: %pM\n" , + ev->peer_mac_addr);return 0 ; }
@@ -1027,24 +1027,25 @@ static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len)*/ static int ath6kl_wmi_error_event_rx (struct wmi *wmi,u8 *datap,int len) { +const char *type ="unknown error" ;struct wmi_cmd_error_event *ev; - ev = (struct wmi_cmd_error_event *) datap; -ath6kl_dbg (ATH6KL_DBG_WMI ,"programming error, cmd=%d " , ev->cmd_id); -switch (ev->err_code) {case INVALID_PARAM : -ath6kl_dbg (ATH6KL_DBG_WMI ,"illegal parameter\n" ); + type ="invalid parameter" ;break ;case ILLEGAL_STATE : -ath6kl_dbg (ATH6KL_DBG_WMI ,"illegal state\n" ); + type ="invalid state" ;break ;case INTERNAL_ERROR : -ath6kl_dbg (ATH6KL_DBG_WMI ,"internal error\n" ); + type ="internal error" ;break ; } +ath6kl_dbg (ATH6KL_DBG_WMI ,"programming error, cmd=%d %s\n" , + ev->cmd_id, type); +return 0 ; }
Signature · 1 line
1.7.6.131.g99019
PATCH 2/3 ath6kl: Remove __func__ uses from ath6kl_err
In reply to Joe PerchesRemove unnecessary clutter from ath6kl_err messages.
--- drivers/net/wireless/ath/ath6kl/bmi.c | 2 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 129 +++++++++++++-------------- drivers/net/wireless/ath/ath6kl/htc.c | 7 +- drivers/net/wireless/ath/ath6kl/htc_hif.c | 3 +- drivers/net/wireless/ath/ath6kl/init.c | 78 +++++++---------- drivers/net/wireless/ath/ath6kl/main.c | 16 ++-- drivers/net/wireless/ath/ath6kl/txrx.c | 39 ++++----- drivers/net/wireless/ath/ath6kl/wmi.c | 8 +- 8 files changed, 125 insertions(+), 157 deletions(-)
drivers/net/wireless/ath/ath6kl/bmi.c +1 -1
@@ -55,7 +55,7 @@ static int ath6kl_get_bmi_cmd_credits(struct ath6kl *ar) }if (!ar->bmi.cmd_credits) { -ath6kl_err ("%s bmi communication timeout\n" , __func__); +ath6kl_err ("bmi communication timeout\n" );return -ETIMEDOUT ; }
drivers/net/wireless/ath/ath6kl/cfg80211.c +62 -67
434 lines not on this page · raw message
drivers/net/wireless/ath/ath6kl/htc.c +3 -4
@@ -81,8 +81,7 @@ static void htc_tx_comp_update(struct htc_target *target,if (!packet->status)return ; -ath6kl_err ("%s: req failed (status:%d, ep:%d, len:%d creds:%d)\n" , - __func__, +ath6kl_err ("req failed (status:%d, ep:%d, len:%d creds:%d)\n" , packet->status, packet->endpoint, packet->act_len, packet->info.tx.cred_used);
@@ -906,8 +905,8 @@ static int dev_rx_pkt(struct htc_target *target, struct htc_packet *packet, padded_len =CALC_TXRX_PADDED_LEN (dev, rx_len);if (padded_len > packet->buf_len) { -ath6kl_err ("%s: not enough space for padlen:%d recvlen:%d bufferlen:%d\n" , - __func__, padded_len, rx_len, packet->buf_len); +ath6kl_err ("not enough receive space for packet - padlen:%d recvlen:%d bufferlen:%d\n" , + padded_len, rx_len, packet->buf_len);return -ENOMEM ; }
drivers/net/wireless/ath/ath6kl/htc_hif.c +1 -2
@@ -553,8 +553,7 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done) rg = &dev->irq_proc_reg; lk_ahd =le32_to_cpu (rg->rx_lkahd[HTC_MAILBOX ]);if (!lk_ahd) -ath6kl_err ("%s():lookAhead is zero!\n" , - __func__); +ath6kl_err ("lookAhead is zero!\n" ); } } }
drivers/net/wireless/ath/ath6kl/init.c +30 -48
242 lines not on this page · raw message
drivers/net/wireless/ath/ath6kl/main.c +7 -9
@@ -204,8 +204,8 @@ static int ath6kl_set_addrwin_reg(struct ath6kl *ar, u32 reg_addr, u32 addr) }if (status) { -ath6kl_err ("%s: failed to write initial bytes of 0x%x to window reg: 0x%X\n" , - __func__, addr, reg_addr); +ath6kl_err ("failed to write initial bytes of 0x%x to window reg: 0x%X\n" , + addr, reg_addr);return status; }
@@ -219,8 +219,8 @@ static int ath6kl_set_addrwin_reg(struct ath6kl *ar, u32 reg_addr, u32 addr) 4, HIF_WR_SYNC_BYTE_INC);if (status) { -ath6kl_err ("%s: failed to write 0x%x to window reg: 0x%X\n" , - __func__, addr, reg_addr); +ath6kl_err ("failed to write 0x%x to window reg: 0x%X\n" , + addr, reg_addr);return status; }
@@ -246,8 +246,7 @@ int ath6kl_read_reg_diag(struct ath6kl *ar, u32 *address, u32 *data) status =hif_read_write_sync (ar,WINDOW_DATA_ADDRESS , (u8 *)data,sizeof (u32),HIF_RD_SYNC_BYTE_INC );if (status) { -ath6kl_err ("%s: failed to read from window data addr\n" , - __func__); +ath6kl_err ("failed to read from window data addr\n" );return status; }
@@ -267,8 +266,7 @@ static int ath6kl_write_reg_diag(struct ath6kl *ar, u32 *address, u32 *data) status =hif_read_write_sync (ar,WINDOW_DATA_ADDRESS , (u8 *)data,sizeof (u32),HIF_WR_SYNC_BYTE_INC );if (status) { -ath6kl_err ("%s: failed to write 0x%x to window data addr\n" , - __func__, *data); +ath6kl_err ("failed to write 0x%x to window data addr\n" , *data);return status; }
@@ -316,7 +314,7 @@ static void ath6kl_reset_device(struct ath6kl *ar, u32 target_type, status =ath6kl_write_reg_diag (ar, &address, &data);if (status) -ath6kl_err ("%s: failed to reset target\n" , __func__); +ath6kl_err ("failed to reset target\n" ); } void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
drivers/net/wireless/ath/ath6kl/txrx.c +17 -22
@@ -194,8 +194,8 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,* are just going to drop this packet. */ cookie =NULL ; -ath6kl_err ("%s: wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n" , - __func__, skb, skb->len); +ath6kl_err ("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n" , + skb, skb->len); }else cookie =ath6kl_alloc_cookie (ar);
@@ -270,14 +270,13 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) }if (ath6kl_wmi_dix_2_dot3 (ar->wmi, skb)) { -ath6kl_err ("%s: ath6kl_wmi_dix_2_dot3 failed\n" , - __func__); +ath6kl_err ("ath6kl_wmi_dix_2_dot3 failed\n" ); goto fail_tx; }if (ath6kl_wmi_data_hdr_add (ar->wmi, skb,DATA_MSGTYPE , more_data,0 ,0 ,NULL )) { -ath6kl_err ("%s: wmi_data_hdr_add failed\n" , __func__); +ath6kl_err ("wmi_data_hdr_add failed\n" ); goto fail_tx; }
@@ -302,7 +301,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) eid = ar->ac2ep_map[ac];if (eid ==0 || eid ==ENDPOINT_UNUSED ) { -ath6kl_err ("%s: eid %d is not mapped!\n" , __func__, eid); +ath6kl_err ("eid %d is not mapped!\n" , eid);spin_unlock_bh (&ar->lock); goto fail_tx; }
@@ -423,7 +422,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,spin_lock_bh (&ar->lock);set_bit (WMI_CTRL_EP_FULL , &ar->flag);spin_unlock_bh (&ar->lock); -ath6kl_err ("%s: wmi ctrl ep is full\n" , __func__); +ath6kl_err ("wmi ctrl ep is full\n" );return HTC_SEND_FULL_KEEP ; }
@@ -562,8 +561,7 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue) ar->net_stats.tx_errors++;if (status != -ENOSPC ) -ath6kl_err ("%s: tx error, status: 0x%x\n" , - __func__, status); +ath6kl_err ("tx error, status: 0x%x\n" , status); ath6kl_dbg(ATH6KL_DBG_WLAN_TX, "%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n", __func__, skb, packet->buf, packet->act_len,
@@ -644,7 +642,7 @@ static void ath6kl_alloc_netbufs(struct sk_buff_head *q, u16 num)while (num) { skb =ath6kl_buf_alloc (ATH6KL_BUFFER_SIZE );if (!skb) { -ath6kl_err ("%s: netbuf allocation failed\n" , __func__); +ath6kl_err ("netbuf allocation failed\n" );return ; }skb_queue_tail (q, skb);
@@ -785,22 +783,22 @@ static void aggr_slice_amsdu(struct aggr_info *p_aggr,if (payload_8023_len <MIN_MSDU_SUBFRAME_PAYLOAD_LEN || payload_8023_len >MAX_MSDU_SUBFRAME_PAYLOAD_LEN ) { -ath6kl_err ("%s: 802.3 AMSDU frame bound check failed. len %d\n" , - __func__, payload_8023_len); +ath6kl_err ("802.3 AMSDU frame bound check failed. len %d\n" , + payload_8023_len);break ; } frame_8023_len = payload_8023_len + mac_hdr_len; new_skb =aggr_get_free_skb (p_aggr);if (!new_skb) { -ath6kl_err ("%s: no buffer available\n" , __func__); +ath6kl_err ("no buffer available\n" );break ; }memcpy (new_skb->data, framep, frame_8023_len);skb_put (new_skb, frame_8023_len);if (ath6kl_wmi_dot3_2_dix (new_skb)) { -ath6kl_err ("%s: dot3_2_dix error\n" , __func__); +ath6kl_err ("dot3_2_dix error\n" );dev_kfree_skb (new_skb);break ; }
@@ -1080,10 +1078,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)*/ if (ar->nw_type !=AP_NETWORK && ((packet->act_len < min_hdr_len) || - (packet->act_len > -WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH ))) { -ath6kl_info ("%s: frame len is too short or too long\n" , - __func__); + (packet->act_len >WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH ))) { +ath6kl_info ("frame len is too short or too long\n" ); ar->net_stats.rx_errors++; ar->net_stats.rx_length_errors++;dev_kfree_skb (skb);
@@ -1255,8 +1251,8 @@ static void aggr_timeout(unsigned long arg)continue ; stats->num_timeouts++; -ath6kl_err ("%s: aggr timeout (st %d end %d)\n" , - __func__, rxtid->seq_next, +ath6kl_err ("aggr timeout (st %d end %d)\n" , + rxtid->seq_next, ((rxtid->seq_next + rxtid->hold_q_sz-1 ) &ATH6KL_MAX_SEQ_NO ));aggr_deque_frms (p_aggr, i,0 ,0 );
@@ -1356,8 +1352,7 @@ struct aggr_info *aggr_init(struct net_device *dev) p_aggr =kzalloc (sizeof (struct aggr_info ),GFP_KERNEL );if (!p_aggr) { -ath6kl_err ("%s: failed to alloc memory for aggr_node\n" , - __func__); +ath6kl_err ("failed to alloc memory for aggr_node\n" );return NULL ; }
drivers/net/wireless/ath/ath6kl/wmi.c +4 -4
@@ -1373,7 +1373,7 @@ static int ath6kl_wmi_snr_threshold_event_rx(struct wmi *wmi, u8 *datap, ret =ath6kl_wmi_send_snr_threshold_params (wmi, &cmd);if (ret) { -ath6kl_err ("%s: unable to configure snr threshold\n" , __func__); +ath6kl_err ("unable to configure snr threshold\n" );return -EIO ; }
@@ -2490,7 +2490,7 @@ static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb)int ret =0 ;if (skb->len <sizeof (struct wmix_cmd_hdr )) { -ath6kl_err ("%s: bad packet 1\n" , __func__); +ath6kl_err ("bad packet 1\n" ); wmi->stat.cmd_len_err++;return -EINVAL ; }
@@ -2509,7 +2509,7 @@ static int ath6kl_wmi_control_rx_xtnd(struct wmi *wmi, struct sk_buff *skb)case WMIX_DBGLOG_EVENTID :break ;default : -ath6kl_err ("%s: unknown cmd id 0x%x\n" , __func__, id); +ath6kl_err ("unknown cmd id 0x%x\n" , id); wmi->stat.cmd_id_err++; ret = -EINVAL ;break ;
@@ -2531,7 +2531,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)return -EINVAL ;if (skb->len <sizeof (struct wmi_cmd_hdr )) { -ath6kl_err ("%s: bad packet 1\n" , __func__); +ath6kl_err ("bad packet 1\n" );dev_kfree_skb (skb); wmi->stat.cmd_len_err++;return -EINVAL ;
Signature · 1 line
1.7.6.131.g99019
PATCH 3/3 ath6kl: cfg80211: Add and use ath6kl_cfg80211_ready helper
In reply to Joe PerchesReduce code duplication by using a helper function to check if the device is ready.
--- drivers/net/wireless/ath/ath6kl/cfg80211.c | 150 ++++++---------------------- 1 files changed, 30 insertions(+), 120 deletions(-)
drivers/net/wireless/ath/ath6kl/cfg80211.c +30 -120
@@ -217,6 +217,21 @@ static void ath6kl_set_key_mgmt(struct ath6kl *ar, u32 key_mgmt) } } +static bool ath6kl_cfg80211_ready (struct ath6kl *ar) +{ +if (!test_bit (WMI_READY , &ar->flag)) { +ath6kl_err ("wmi is not ready\n" ); +return false; + } + +if (ar->wlan_state ==WLAN_DISABLED ) { +ath6kl_err ("wlan disabled\n" ); +return false; + } + +return true; +} +static int ath6kl_cfg80211_connect (struct wiphy *wiphy,struct net_device *dev,struct cfg80211_connect_params *sme) {
@@ -225,15 +240,8 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ar->sme_state =SME_CONNECTING ; -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready yet\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); -return -EIO ; - }if (test_bit (DESTROY_IN_PROGRESS , &ar->flag)) {ath6kl_err ("destroy in progress\n" );
@@ -575,15 +583,8 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: reason=%u\n" , __func__, reason_code); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (test_bit (DESTROY_IN_PROGRESS , &ar->flag)) {ath6kl_err ("busy, destroy in progress\n" );
@@ -781,15 +782,8 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,int ret =0 ;u32 force_fg_scan =0 ; -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); -return -EIO ; - }if (!ar->usr_bss_filter) { if (ath6kl_wmi_bssfilter_cmd(ar->wmi,
@@ -866,15 +860,8 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,u8 key_type;int status =0 ; -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (key_index <WMI_MIN_KEY_INDEX || key_index >WMI_MAX_KEY_INDEX ) { ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -951,15 +938,8 @@ static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: index %d\n" , __func__, key_index); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (key_index <WMI_MIN_KEY_INDEX || key_index >WMI_MAX_KEY_INDEX ) { ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -991,15 +971,8 @@ static int ath6kl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: index %d\n" , __func__, key_index); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (key_index <WMI_MIN_KEY_INDEX || key_index >WMI_MAX_KEY_INDEX ) { ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -1033,15 +1006,8 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: index %d\n" , __func__, key_index); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (key_index <WMI_MIN_KEY_INDEX || key_index >WMI_MAX_KEY_INDEX ) { ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -1081,15 +1047,8 @@ static int ath6kl_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: index %d\n" , __func__, key_index); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); -return -EIO ; - }ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: not supported\n" , __func__);return -ENOTSUPP ;
@@ -1115,15 +1074,8 @@ static int ath6kl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: changed 0x%x\n" , __func__, changed); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (changed &WIPHY_PARAM_RTS_THRESHOLD ) { ret =ath6kl_wmi_set_rts_cmd (ar->wmi, wiphy->rts_threshold);
@@ -1150,15 +1102,8 @@ static int ath6kl_cfg80211_set_txpower(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: type 0x%x, dbm %d\n" , __func__, type, dbm); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }switch (type) {case NL80211_TX_POWER_AUTOMATIC :
@@ -1181,15 +1126,8 @@ static int ath6kl_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm) {struct ath6kl *ar = (struct ath6kl *)wiphy_priv (wiphy); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (test_bit (CONNECTED , &ar->flag)) { ar->tx_pwr =0 ;
@@ -1222,15 +1160,8 @@ static int ath6kl_cfg80211_set_power_mgmt(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: pmgmt %d, timeout %d\n" , __func__, pmgmt, timeout); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (pmgmt) {ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: max perf\n" , __func__);
@@ -1258,15 +1189,8 @@ static int ath6kl_cfg80211_change_iface(struct wiphy *wiphy,ath6kl_dbg (ATH6KL_DBG_WLAN_CFG ,"%s: type %u\n" , __func__, type); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }switch (type) {case NL80211_IFTYPE_STATION :
@@ -1292,15 +1216,8 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,struct ath6kl *ar =ath6kl_priv (dev);int status; -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }if (!ibss_param->ssid_len ||IEEE80211_MAX_SSID_LEN < ibss_param->ssid_len) {
@@ -1367,15 +1284,8 @@ static int ath6kl_cfg80211_leave_ibss(struct wiphy *wiphy, {struct ath6kl *ar = (struct ath6kl *)ath6kl_priv (dev); -if (!test_bit (WMI_READY , &ar->flag)) { -ath6kl_err ("wmi is not ready\n" ); -return -EIO ; - } - -if (ar->wlan_state ==WLAN_DISABLED ) { -ath6kl_err ("wlan disabled\n" ); +if (!ath6kl_cfg80211_ready (ar))return -EIO ; - }ath6kl_disconnect (ar);memset (ar->ssid,0 ,sizeof (ar->ssid));
Signature · 1 line
1.7.6.131.g99019
Quoted 4 lines · Joe Perches
Joe Perches (3):
ath6kl: Add missing newlines and coalesce messages
ath6kl: Remove__func__uses fromath6kl_err
ath6kl: cfg80211: Add and useath6kl_cfg80211_readyhelper
Nice, thanks a lot. I'm planning to send v3 of athk6kl patches later today. Is it okay for you if I amend your three patches to that patchset?
Kalle
Quoted 7 lines · Kalle Valo
Quoted 4 lines · Joe Perches
Joe Perches (3):
ath6kl: Add missing newlines and coalesce messages
ath6kl: Remove__func__uses fromath6kl_err
ath6kl: cfg80211: Add and useath6kl_cfg80211_readyhelperNice, thanks a lot. I'm planning to send v3 of athk6kl patches later today. Is it okay for you if I amend your three patches to that patchset?
'course.
Quoted 10 lines · Joe Perches
Quoted 7 lines · Kalle Valo
Quoted 4 lines · Joe Perches
Joe Perches (3):
ath6kl: Add missing newlines and coalesce messages
ath6kl: Remove__func__uses fromath6kl_err
ath6kl: cfg80211: Add and useath6kl_cfg80211_readyhelperNice, thanks a lot. I'm planning to send v3 of athk6kl patches later today. Is it okay for you if I amend your three patches to that patchset?
'course.
Great, thanks. I have now applied your patches to ath6kl-cleanup tree and they will be included in patchset v3.
Kalle
cover ath6kl: more neatening
Quoted 2 lines
Great, thanks. I have now applied your patches to ath6kl-cleanup tree and they will be included in patchset v3.
Here's a couple of more.
Joe Perches (2):
ath6kl: Remove __func__ uses from ath6kl_dbg
ath6kl: Remove trailing unpaired close paren from ath6kl_err uses
drivers/net/wireless/ath/ath6kl/bmi.c | 4 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 101 ++++++++++++--------------- drivers/net/wireless/ath/ath6kl/debug.c | 20 +++--- drivers/net/wireless/ath/ath6kl/debug.h | 27 ++++---- drivers/net/wireless/ath/ath6kl/htc.c | 11 ++-- drivers/net/wireless/ath/ath6kl/init.c | 8 +- drivers/net/wireless/ath/ath6kl/main.c | 13 ++-- drivers/net/wireless/ath/ath6kl/sdio.c | 12 ++-- drivers/net/wireless/ath/ath6kl/txrx.c | 30 ++++----- drivers/net/wireless/ath/ath6kl/wmi.c | 8 +-- 10 files changed, 107 insertions(+), 127 deletions(-)
Signature · 1 line
1.7.6.131.g99019
Re: [PATCH 0/2] ath6kl: more neatening
Quoted 8 lines · Joe Perches
Quoted 2 lines
Great, thanks. I have now applied your patches to ath6kl-cleanup tree and they will be included in patchset v3.
Here's a couple of more.
Joe Perches (2):
ath6kl: Remove__func__uses fromath6kl_dbg
ath6kl: Remove trailing unpaired close paren fromath6kl_erruses
Thanks again.
I just sent v3. But if I need to create v4 (I hope not) I'll include your patches. If v3 is ok, I can resend your patches to wireless-testing so that you don't need to followup.
Kalle
PATCH 1/2 ath6kl: Remove __func__ uses from ath6kl_dbg
In reply to Kalle ValoMake the ath6kl_dbg uses consistly _not_ use __func__. Add __func__ to #define ath6kl_dbg.
Remove __func__ from single ath6kl_err.
--- drivers/net/wireless/ath/ath6kl/bmi.c | 4 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 101 ++++++++++++--------------- drivers/net/wireless/ath/ath6kl/debug.c | 20 +++--- drivers/net/wireless/ath/ath6kl/debug.h | 27 ++++---- drivers/net/wireless/ath/ath6kl/htc.c | 11 ++-- drivers/net/wireless/ath/ath6kl/init.c | 8 +- drivers/net/wireless/ath/ath6kl/main.c | 13 ++-- drivers/net/wireless/ath/ath6kl/sdio.c | 8 +- drivers/net/wireless/ath/ath6kl/txrx.c | 30 ++++----- drivers/net/wireless/ath/ath6kl/wmi.c | 8 +-- 10 files changed, 105 insertions(+), 125 deletions(-)
drivers/net/wireless/ath/ath6kl/bmi.c +2 -2
@@ -407,7 +407,7 @@ int ath6kl_bmi_execute(struct ath6kl *ar, u32 addr, u32 *param) }memset (ar->bmi.cmd_buf,0 , size); -ath6kl_dbg (ATH6KL_DBG_BMI ,"bmi execute: addr: 0x%x, param: %d)\n" , +ath6kl_dbg (ATH6KL_DBG_BMI ,"bmi execute: addr: 0x%x, param: %d\n" , addr, *param); offset =0 ;
@@ -575,7 +575,7 @@ int ath6kl_bmi_lz_data(struct ath6kl *ar, u8 *buf, u32 len) }memset (ar->bmi.cmd_buf,0 , size); -ath6kl_dbg (ATH6KL_DBG_BMI ,"bmi send LZ data: len: %d)\n" , +ath6kl_dbg (ATH6KL_DBG_BMI ,"bmi send LZ data: len: %d\n" , len); len_remain = len;
drivers/net/wireless/ath/ath6kl/cfg80211.c +45 -56
308 lines not on this page · raw message
drivers/net/wireless/ath/ath6kl/debug.c +10 -10
@@ -41,33 +41,33 @@ void ath6kl_dump_registers(struct ath6kl_device *dev, struct ath6kl_irq_enable_reg *irq_enable_reg) { -ath6kl_dbg (ATH6KL_DBG_ANY , ("<------- Register Table -------->\n" )); +ath6kl_dbg (ATH6KL_DBG_ANY ,"<------- Register Table -------->\n" );if (irq_proc_reg !=NULL ) {ath6kl_dbg (ATH6KL_DBG_ANY , -"Host Int status: 0x%x\n" , - irq_proc_reg->host_int_status); +"Host Int status: 0x%x\n" , + irq_proc_reg->host_int_status);ath6kl_dbg (ATH6KL_DBG_ANY ,"CPU Int status: 0x%x\n" , - irq_proc_reg->cpu_int_status); + irq_proc_reg->cpu_int_status);ath6kl_dbg (ATH6KL_DBG_ANY ,"Error Int status: 0x%x\n" , - irq_proc_reg->error_int_status); + irq_proc_reg->error_int_status);ath6kl_dbg (ATH6KL_DBG_ANY ,"Counter Int status: 0x%x\n" , - irq_proc_reg->counter_int_status); + irq_proc_reg->counter_int_status);ath6kl_dbg (ATH6KL_DBG_ANY ,"Mbox Frame: 0x%x\n" , - irq_proc_reg->mbox_frame); + irq_proc_reg->mbox_frame);ath6kl_dbg (ATH6KL_DBG_ANY ,"Rx Lookahead Valid: 0x%x\n" , - irq_proc_reg->rx_lkahd_valid); + irq_proc_reg->rx_lkahd_valid);ath6kl_dbg (ATH6KL_DBG_ANY ,"Rx Lookahead 0: 0x%x\n" , - irq_proc_reg->rx_lkahd[0 ]); + irq_proc_reg->rx_lkahd[0 ]);ath6kl_dbg (ATH6KL_DBG_ANY ,"Rx Lookahead 1: 0x%x\n" , - irq_proc_reg->rx_lkahd[1 ]); + irq_proc_reg->rx_lkahd[1 ]);if (dev->ar->mbox_info.gmbox_addr !=0 ) {/*
drivers/net/wireless/ath/ath6kl/debug.h +14 -13
@@ -42,7 +42,7 @@ extern unsigned int debug_mask;extern int ath6kl_printk (const char *level,const char *fmt, ...) __attribute__ ((format (printf,2 ,3 ))); -#define ath6kl_info (fmt, ...) \ +#define ath6kl_info (fmt, ...) \ ath6kl_printk(KERN_INFO, fmt, ##__VA_ARGS__)#define ath6kl_err (fmt, ...) \ ath6kl_printk(KERN_ERR, fmt, ##__VA_ARGS__)
@@ -52,16 +52,17 @@ extern int ath6kl_printk(const char *level, const char *fmt, ...)#define AR_DBG_LVL_CHECK (mask) (debug_mask & mask)#ifdef CONFIG_ATH6KL_DEBUG -#define ath6kl_dbg (mask, fmt, ...) \ - ({ \ - int rtn; \ - if (debug_mask & mask) \ - rtn = ath6kl_printk(KERN_DEBUG, fmt, ##__VA_ARGS__); \ - else \ - rtn = 0; \ - \ - rtn; \ - }) +#define ath6kl_dbg (mask, fmt, ...) \ +({ \ + int rtn; \ + if (debug_mask & mask) \ + rtn = ath6kl_printk(KERN_DEBUG, "%s: " fmt, \ + __func__, ##__VA_ARGS__); \ + else \ + rtn = 0; \ + \ + rtn; \ +}) static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, const char *msg, const void *buf,
@@ -78,8 +79,8 @@ void ath6kl_dump_registers(struct ath6kl_device *dev, struct ath6kl_irq_enable_reg *irq_en_reg);void dump_cred_dist_stats (struct htc_target *target);#else -static inline int ath6kl_dbg (enum ATH6K_DEBUG_MASK dbg_mask, -const char *fmt, ...) +static inline __attribute__ ((format (printf,2 ,3 ))) +int ath6kl_dbg (enum ATH6K_DEBUG_MASK dbg_mask,const char *fmt, ...) {return 0 ; }
drivers/net/wireless/ath/ath6kl/htc.c +5 -6
@@ -175,16 +175,15 @@ static int htc_issue_send(struct htc_target *target, struct htc_packet *packet) send_len = packet->act_len +HTC_HDR_LENGTH ; -ath6kl_dbg (ATH6KL_DBG_HTC_SEND ,"%s: transmit len : %d (%s)\n" , - __func__, send_len, sync ?"sync" :"async" ); +ath6kl_dbg (ATH6KL_DBG_HTC_SEND ,"transmit len : %d (%s)\n" , + send_len, sync ?"sync" :"async" ); padded_len =CALC_TXRX_PADDED_LEN (target->dev, send_len);ath6kl_dbg (ATH6KL_DBG_HTC_SEND , -"DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n" , - padded_len, - target->dev->ar->mbox_info.htc_addr, - sync ?"sync" :"async" ); +"DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n" , + padded_len, target->dev->ar->mbox_info.htc_addr, + sync ?"sync" :"async" );if (sync) { status = hif_read_write_sync(target->dev->ar,
drivers/net/wireless/ath/ath6kl/init.c +4 -4
@@ -1060,7 +1060,7 @@ static int ath6kl_init(struct net_device *dev) goto ath6kl_init_done; } -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: got wmi @ 0x%p.\n" , __func__, ar->wmi); +ath6kl_dbg (ATH6KL_DBG_TRC ,"got wmi @ 0x%p\n" , ar->wmi);/* * The reason we have to wait for the target here is that the
@@ -1122,7 +1122,7 @@ static int ath6kl_init(struct net_device *dev) goto err_htc_stop; } -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: wmi is ready\n" , __func__); +ath6kl_dbg (ATH6KL_DBG_TRC ,"wmi is ready\n" );/* communicate the wmi protocol verision to the target */ if ((ath6kl_set_host_app_area (ar)) !=0 )
@@ -1208,8 +1208,8 @@ int ath6kl_core_init(struct ath6kl *ar)set_bit (NETDEV_REGISTERED , &ar->flag); -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: name=%s dev=0x%p, ar=0x%p\n" , - __func__, ar->net_dev->name, ar->net_dev, ar); +ath6kl_dbg (ATH6KL_DBG_TRC ,"name=%s dev=0x%p, ar=0x%p\n" , + ar->net_dev->name, ar->net_dev, ar);return ret;
drivers/net/wireless/ath/ath6kl/main.c +5 -8
@@ -359,14 +359,12 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, ar->user_key_ctrl =0 ; }else { -ath6kl_dbg (ATH6KL_DBG_TRC , -"%s: wmi is not ready 0x%p 0x%p\n" , - __func__, ar, ar->wmi); +ath6kl_dbg (ATH6KL_DBG_TRC ,"wmi is not ready 0x%p 0x%p\n" , + ar, ar->wmi);/* Shut down WMI if we have started it */ if (test_bit (WMI_ENABLED , &ar->flag)) { -ath6kl_dbg (ATH6KL_DBG_TRC , -"%s: shut down wmi\n" , __func__); +ath6kl_dbg (ATH6KL_DBG_TRC ,"shut down wmi\n" );ath6kl_wmi_shutdown (ar->wmi);clear_bit (WMI_ENABLED , &ar->flag); ar->wmi =NULL ;
@@ -374,7 +372,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, }if (ar->htc_target) { -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: shut down htc\n" , __func__); +ath6kl_dbg (ATH6KL_DBG_TRC ,"shut down htc\n" );htc_stop (ar->htc_target); }
@@ -801,8 +799,7 @@ void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver)struct net_device *dev = ar->net_dev;memcpy (dev->dev_addr, datap,ETH_ALEN ); -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: mac addr = %pM\n" , - __func__, dev->dev_addr); +ath6kl_dbg (ATH6KL_DBG_TRC ,"mac addr = %pM\n" , dev->dev_addr); ar->version.wlan_ver = sw_ver; ar->version.abi_ver = abi_ver;
drivers/net/wireless/ath/ath6kl/sdio.c +4 -4
@@ -145,7 +145,7 @@ static struct bus_request *ath6kl_sdio_alloc_busreq(struct ath6kl_sdio *ar_sdio)list_del (&bus_req->list);spin_unlock_irqrestore (&ar_sdio->lock, flag); -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: bus request 0x%p\n" , __func__, bus_req); +ath6kl_dbg (ATH6KL_DBG_TRC ,"bus request 0x%p\n" , bus_req);return bus_req; }
@@ -155,7 +155,7 @@ static void ath6kl_sdio_free_bus_req(struct ath6kl_sdio *ar_sdio, {unsigned long flag; -ath6kl_dbg (ATH6KL_DBG_TRC ,"%s: bus request 0x%p\n" , __func__, bus_req); +ath6kl_dbg (ATH6KL_DBG_TRC ,"bus request 0x%p\n" , bus_req);spin_lock_irqsave (&ar_sdio->lock, flag);list_add_tail (&bus_req->list, &ar_sdio->bus_req_freeq);
@@ -683,8 +683,8 @@ static int ath6kl_sdio_probe(struct sdio_func *func,int count;ath6kl_dbg (ATH6KL_DBG_TRC , -"%s: func: 0x%X, vendor id: 0x%X, dev id: 0x%X, block size: 0x%X/0x%X\n" , - __func__, func->num, func->vendor, +"func: 0x%X, vendor id: 0x%X, dev id: 0x%X, block size: 0x%X/0x%X\n" , + func->num, func->vendor, func->device, func->max_blksize, func->cur_blksize); ar_sdio =kzalloc (sizeof (struct ath6kl_sdio ),GFP_KERNEL );
drivers/net/wireless/ath/ath6kl/txrx.c +13 -17
@@ -184,8 +184,7 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,spin_lock_bh (&ar->lock); -ath6kl_dbg (ATH6KL_DBG_WLAN_TX , -"%s: skb=0x%p, len=0x%x eid =%d\n" , __func__, +ath6kl_dbg (ATH6KL_DBG_WLAN_TX ,"skb=0x%p, len=0x%x eid=%d\n" , skb, skb->len, eid);if (test_bit (WMI_CTRL_EP_FULL , &ar->flag) && (eid == ar->ctrl_ep)) {
@@ -242,8 +241,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)struct wmi_tx_meta_v2 meta_v2;int ret; -ath6kl_dbg (ATH6KL_DBG_WLAN_TX , -"%s: skb=0x%p, data=0x%p, len=0x%x\n" , __func__, +ath6kl_dbg (ATH6KL_DBG_WLAN_TX ,"skb=0x%p, data=0x%p, len=0x%x\n" , skb, skb->data, skb->len);/* If target is not associated */
@@ -563,13 +561,13 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue)if (status != -ENOSPC )ath6kl_err ("tx error, status: 0x%x\n" , status);ath6kl_dbg (ATH6KL_DBG_WLAN_TX , -"%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , - __func__, skb, packet->buf, packet->act_len, +"skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , + skb, packet->buf, packet->act_len, eid,"error!" ); }else {ath6kl_dbg (ATH6KL_DBG_WLAN_TX , -"%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , - __func__, skb, packet->buf, packet->act_len, +"skb=0x%p data=0x%p len=0x%x eid=%d %s\n" , + skb, packet->buf, packet->act_len, eid,"OK" ); flushing = false;
@@ -680,8 +678,8 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint)INIT_LIST_HEAD (&queue);ath6kl_dbg (ATH6KL_DBG_WLAN_RX , -"%s: providing htc with %d buffers at eid=%d\n" , - __func__, n_buf_refill, endpoint); +"providing htc with %d buffers at eid=%d\n" , + n_buf_refill, endpoint);for (rx_buf =0 ; rx_buf < n_buf_refill; rx_buf++) { skb =ath6kl_buf_alloc (ATH6KL_BUFFER_SIZE );
@@ -731,8 +729,7 @@ struct htc_packet *ath6kl_alloc_amsdu_rxbuf(struct htc_target *target,struct list_head *pkt_pos;int refill_cnt =0 , depth =0 ; -ath6kl_dbg (ATH6KL_DBG_WLAN_RX ,"%s: eid=%d, len:%d\n" , - __func__, endpoint, len); +ath6kl_dbg (ATH6KL_DBG_WLAN_RX ,"eid=%d, len:%d\n" , endpoint, len);if ((len <=ATH6KL_BUFFER_SIZE ) || (len >ATH6KL_AMSDU_BUFFER_SIZE ))
@@ -1025,9 +1022,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)u8 tid;ath6kl_dbg (ATH6KL_DBG_WLAN_RX , -"%s: ar=0x%p eid=%d, skb=0x%p, data=0x%p, len=0x%x status:%d" , - __func__, ar, ept, skb, packet->buf, - packet->act_len, status); +"ar=0x%p eid=%d, skb=0x%p, data=0x%p, len=0x%x status:%d\n" , + ar, ept, skb, packet->buf, packet->act_len, status);if (status || !(skb->data +HTC_HDR_LENGTH )) { ar->net_stats.rx_errors++;
@@ -1324,8 +1320,8 @@ void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no, u8 win_sz) stats = &p_aggr->stat[tid];if (win_sz <AGGR_WIN_SZ_MIN || win_sz >AGGR_WIN_SZ_MAX ) -ath6kl_dbg (ATH6KL_DBG_WLAN_RX ,"%s: win_sz %d, tid %d\n" , - __func__, win_sz, tid); +ath6kl_dbg (ATH6KL_DBG_WLAN_RX ,"win_sz %d, tid %d\n" , + win_sz, tid);if (rxtid->aggr)aggr_delete_tid_state (p_aggr, tid);
drivers/net/wireless/ath/ath6kl/wmi.c +3 -5
@@ -102,8 +102,7 @@ int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb) type = eth_hdr->h_proto;if (!is_ethertype (be16_to_cpu (type))) { -ath6kl_dbg (ATH6KL_DBG_WMI , -"%s: pkt is already in 802.3 format\n" , __func__); +ath6kl_dbg (ATH6KL_DBG_WMI ,"pkt is already in 802.3 format\n" );return 0 ; }
@@ -496,8 +495,7 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len) ev = (struct wmi_connect_event *) datap; -ath6kl_dbg (ATH6KL_DBG_WMI ,"%s: freq %d bssid %pM\n" , - __func__, ev->ch, ev->bssid); +ath6kl_dbg (ATH6KL_DBG_WMI ,"freq %d bssid %pM\n" , ev->ch, ev->bssid);memcpy (wmi->bssid, ev->bssid,ETH_ALEN );
@@ -2545,7 +2543,7 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) datap = skb->data; len = skb->len; -ath6kl_dbg (ATH6KL_DBG_WMI ,"%s: wmi id: %d\n" , __func__, id); +ath6kl_dbg (ATH6KL_DBG_WMI ,"wmi id: %d\n" , id);ath6kl_dbg_dump (ATH6KL_DBG_RAW_BYTES ,"msg payload " , datap, len);switch (id) {
Signature · 1 line
1.7.6.131.g99019
PATCH 2/2 ath6kl: Remove trailing unpaired close paren from ath6kl_err uses
In reply to Kalle ValoUnpaired parentheses are unsightly.
--- drivers/net/wireless/ath/ath6kl/sdio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath6kl/sdio.c +2 -2
@@ -511,7 +511,7 @@ static int ath6kl_sdio_power_on(struct ath6kl_sdio *ar_sdio) ret =sdio_enable_func (func);if (ret) { -ath6kl_err ("Unable to enable sdio func: %d)\n" , ret); +ath6kl_err ("Unable to enable sdio func: %d\n" , ret);sdio_release_host (func);return ret; }
@@ -760,7 +760,7 @@ static int ath6kl_sdio_probe(struct sdio_func *func, ret =sdio_set_block_size (func,HIF_MBOX_BLOCK_SIZE );if (ret) { -ath6kl_err ("Set sdio block size %d failed: %d)\n" , +ath6kl_err ("Set sdio block size %d failed: %d\n" ,HIF_MBOX_BLOCK_SIZE , ret);sdio_release_host (func); goto err_off;
Signature · 6 lines
1.7.6.131.g99019 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html