diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-03-11 06:58:01 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-03-13 01:46:56 -0400 |
commit | a5d8f9dfcf5ead45a2f164f15ca4839325c08815 (patch) | |
tree | 486fcbad57256031c06cfe4aad13fa0a3064b5c6 /drivers/net/wireless/ath/ath6kl | |
parent | 3629fa14388dbfcb150f5178a018b7eb265a1189 (diff) |
ath6kl: use braces on both arms of if statement
Fixes checkpatch warning:
CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_mbox.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 13 |
6 files changed, 44 insertions, 27 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 9e3af815a4f3..09285084bcd3 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -724,8 +724,9 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif, | |||
724 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 724 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
725 | "added bss %pM to cfg80211\n", bssid); | 725 | "added bss %pM to cfg80211\n", bssid); |
726 | kfree(ie); | 726 | kfree(ie); |
727 | } else | 727 | } else { |
728 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "cfg80211 already has a bss\n"); | 728 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "cfg80211 already has a bss\n"); |
729 | } | ||
729 | 730 | ||
730 | return bss; | 731 | return bss; |
731 | } | 732 | } |
@@ -2848,8 +2849,9 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev, | |||
2848 | if (p.prwise_crypto_type == 0) { | 2849 | if (p.prwise_crypto_type == 0) { |
2849 | p.prwise_crypto_type = NONE_CRYPT; | 2850 | p.prwise_crypto_type = NONE_CRYPT; |
2850 | ath6kl_set_cipher(vif, 0, true); | 2851 | ath6kl_set_cipher(vif, 0, true); |
2851 | } else if (info->crypto.n_ciphers_pairwise == 1) | 2852 | } else if (info->crypto.n_ciphers_pairwise == 1) { |
2852 | ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true); | 2853 | ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true); |
2854 | } | ||
2853 | 2855 | ||
2854 | switch (info->crypto.cipher_group) { | 2856 | switch (info->crypto.cipher_group) { |
2855 | case WLAN_CIPHER_SUITE_WEP40: | 2857 | case WLAN_CIPHER_SUITE_WEP40: |
diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index 1d713dcbad38..e481f14b9878 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c | |||
@@ -112,9 +112,9 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info, | |||
112 | if (cur_ep_dist->endpoint == ENDPOINT_0) | 112 | if (cur_ep_dist->endpoint == ENDPOINT_0) |
113 | continue; | 113 | continue; |
114 | 114 | ||
115 | if (cur_ep_dist->svc_id == WMI_CONTROL_SVC) | 115 | if (cur_ep_dist->svc_id == WMI_CONTROL_SVC) { |
116 | cur_ep_dist->cred_norm = cur_ep_dist->cred_per_msg; | 116 | cur_ep_dist->cred_norm = cur_ep_dist->cred_per_msg; |
117 | else { | 117 | } else { |
118 | /* | 118 | /* |
119 | * For the remaining data endpoints, we assume that | 119 | * For the remaining data endpoints, we assume that |
120 | * each cred_per_msg are the same. We use a simple | 120 | * each cred_per_msg are the same. We use a simple |
@@ -1418,9 +1418,9 @@ static int ath6kl_htc_rx_setup(struct htc_target *target, | |||
1418 | } | 1418 | } |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | if (list_empty(&ep->rx_bufq)) | 1421 | if (list_empty(&ep->rx_bufq)) { |
1422 | packet = NULL; | 1422 | packet = NULL; |
1423 | else { | 1423 | } else { |
1424 | packet = list_first_entry(&ep->rx_bufq, | 1424 | packet = list_first_entry(&ep->rx_bufq, |
1425 | struct htc_packet, list); | 1425 | struct htc_packet, list); |
1426 | list_del(&packet->list); | 1426 | list_del(&packet->list); |
@@ -2813,8 +2813,9 @@ static int ath6kl_htc_reset(struct htc_target *target) | |||
2813 | packet->buf = packet->buf_start; | 2813 | packet->buf = packet->buf_start; |
2814 | packet->endpoint = ENDPOINT_0; | 2814 | packet->endpoint = ENDPOINT_0; |
2815 | list_add_tail(&packet->list, &target->free_ctrl_rxbuf); | 2815 | list_add_tail(&packet->list, &target->free_ctrl_rxbuf); |
2816 | } else | 2816 | } else { |
2817 | list_add_tail(&packet->list, &target->free_ctrl_txbuf); | 2817 | list_add_tail(&packet->list, &target->free_ctrl_txbuf); |
2818 | } | ||
2818 | } | 2819 | } |
2819 | 2820 | ||
2820 | return 0; | 2821 | return 0; |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index fcaab0f56e70..d56554674da4 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -690,8 +690,9 @@ void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast) | |||
690 | cfg80211_michael_mic_failure(vif->ndev, sta->mac, | 690 | cfg80211_michael_mic_failure(vif->ndev, sta->mac, |
691 | NL80211_KEYTYPE_PAIRWISE, keyid, | 691 | NL80211_KEYTYPE_PAIRWISE, keyid, |
692 | tsc, GFP_KERNEL); | 692 | tsc, GFP_KERNEL); |
693 | } else | 693 | } else { |
694 | ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast); | 694 | ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast); |
695 | } | ||
695 | } | 696 | } |
696 | 697 | ||
697 | static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) | 698 | static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) |
@@ -1090,8 +1091,9 @@ static int ath6kl_open(struct net_device *dev) | |||
1090 | if (test_bit(CONNECTED, &vif->flags)) { | 1091 | if (test_bit(CONNECTED, &vif->flags)) { |
1091 | netif_carrier_on(dev); | 1092 | netif_carrier_on(dev); |
1092 | netif_wake_queue(dev); | 1093 | netif_wake_queue(dev); |
1093 | } else | 1094 | } else { |
1094 | netif_carrier_off(dev); | 1095 | netif_carrier_off(dev); |
1096 | } | ||
1095 | 1097 | ||
1096 | return 0; | 1098 | return 0; |
1097 | } | 1099 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 50e886a88dfc..339d89f14d32 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -425,8 +425,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, | |||
425 | memcpy(tbuf, buf, len); | 425 | memcpy(tbuf, buf, len); |
426 | 426 | ||
427 | bounced = true; | 427 | bounced = true; |
428 | } else | 428 | } else { |
429 | tbuf = buf; | 429 | tbuf = buf; |
430 | } | ||
430 | 431 | ||
431 | ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len); | 432 | ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len); |
432 | if ((request & HIF_READ) && bounced) | 433 | if ((request & HIF_READ) && bounced) |
@@ -441,9 +442,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, | |||
441 | static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio, | 442 | static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio, |
442 | struct bus_request *req) | 443 | struct bus_request *req) |
443 | { | 444 | { |
444 | if (req->scat_req) | 445 | if (req->scat_req) { |
445 | ath6kl_sdio_scat_rw(ar_sdio, req); | 446 | ath6kl_sdio_scat_rw(ar_sdio, req); |
446 | else { | 447 | } else { |
447 | void *context; | 448 | void *context; |
448 | int status; | 449 | int status; |
449 | 450 | ||
@@ -673,9 +674,9 @@ static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar, | |||
673 | "hif-scatter: total len: %d scatter entries: %d\n", | 674 | "hif-scatter: total len: %d scatter entries: %d\n", |
674 | scat_req->len, scat_req->scat_entries); | 675 | scat_req->len, scat_req->scat_entries); |
675 | 676 | ||
676 | if (request & HIF_SYNCHRONOUS) | 677 | if (request & HIF_SYNCHRONOUS) { |
677 | status = ath6kl_sdio_scat_rw(ar_sdio, scat_req->busrequest); | 678 | status = ath6kl_sdio_scat_rw(ar_sdio, scat_req->busrequest); |
678 | else { | 679 | } else { |
679 | spin_lock_bh(&ar_sdio->wr_async_lock); | 680 | spin_lock_bh(&ar_sdio->wr_async_lock); |
680 | list_add_tail(&scat_req->busrequest->list, &ar_sdio->wr_asyncq); | 681 | list_add_tail(&scat_req->busrequest->list, &ar_sdio->wr_asyncq); |
681 | spin_unlock_bh(&ar_sdio->wr_async_lock); | 682 | spin_unlock_bh(&ar_sdio->wr_async_lock); |
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index cf27a7107dbb..e9c28a7fd235 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -125,8 +125,9 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn, | |||
125 | *flags |= WMI_DATA_HDR_FLAGS_UAPSD; | 125 | *flags |= WMI_DATA_HDR_FLAGS_UAPSD; |
126 | spin_unlock_bh(&conn->psq_lock); | 126 | spin_unlock_bh(&conn->psq_lock); |
127 | return false; | 127 | return false; |
128 | } else if (!conn->apsd_info) | 128 | } else if (!conn->apsd_info) { |
129 | return false; | 129 | return false; |
130 | } | ||
130 | 131 | ||
131 | if (test_bit(WMM_ENABLED, &vif->flags)) { | 132 | if (test_bit(WMM_ENABLED, &vif->flags)) { |
132 | ether_type = be16_to_cpu(datap->h_proto); | 133 | ether_type = be16_to_cpu(datap->h_proto); |
@@ -316,8 +317,9 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb, | |||
316 | cookie = NULL; | 317 | cookie = NULL; |
317 | ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n", | 318 | ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n", |
318 | skb, skb->len); | 319 | skb, skb->len); |
319 | } else | 320 | } else { |
320 | cookie = ath6kl_alloc_cookie(ar); | 321 | cookie = ath6kl_alloc_cookie(ar); |
322 | } | ||
321 | 323 | ||
322 | if (cookie == NULL) { | 324 | if (cookie == NULL) { |
323 | spin_unlock_bh(&ar->lock); | 325 | spin_unlock_bh(&ar->lock); |
@@ -449,8 +451,9 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
449 | if (ret) | 451 | if (ret) |
450 | goto fail_tx; | 452 | goto fail_tx; |
451 | } | 453 | } |
452 | } else | 454 | } else { |
453 | goto fail_tx; | 455 | goto fail_tx; |
456 | } | ||
454 | 457 | ||
455 | spin_lock_bh(&ar->lock); | 458 | spin_lock_bh(&ar->lock); |
456 | 459 | ||
@@ -1088,8 +1091,9 @@ static void aggr_deque_frms(struct aggr_info_conn *agg_conn, u8 tid, | |||
1088 | else | 1091 | else |
1089 | skb_queue_tail(&rxtid->q, node->skb); | 1092 | skb_queue_tail(&rxtid->q, node->skb); |
1090 | node->skb = NULL; | 1093 | node->skb = NULL; |
1091 | } else | 1094 | } else { |
1092 | stats->num_hole++; | 1095 | stats->num_hole++; |
1096 | } | ||
1093 | 1097 | ||
1094 | rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next); | 1098 | rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next); |
1095 | idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz); | 1099 | idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz); |
@@ -1604,16 +1608,18 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1604 | if (!conn) | 1608 | if (!conn) |
1605 | return; | 1609 | return; |
1606 | aggr_conn = conn->aggr_conn; | 1610 | aggr_conn = conn->aggr_conn; |
1607 | } else | 1611 | } else { |
1608 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1612 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1613 | } | ||
1609 | 1614 | ||
1610 | if (aggr_process_recv_frm(aggr_conn, tid, seq_no, | 1615 | if (aggr_process_recv_frm(aggr_conn, tid, seq_no, |
1611 | is_amsdu, skb)) { | 1616 | is_amsdu, skb)) { |
1612 | /* aggregation code will handle the skb */ | 1617 | /* aggregation code will handle the skb */ |
1613 | return; | 1618 | return; |
1614 | } | 1619 | } |
1615 | } else if (!is_broadcast_ether_addr(datap->h_dest)) | 1620 | } else if (!is_broadcast_ether_addr(datap->h_dest)) { |
1616 | vif->net_stats.multicast++; | 1621 | vif->net_stats.multicast++; |
1622 | } | ||
1617 | 1623 | ||
1618 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); | 1624 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1619 | } | 1625 | } |
@@ -1708,8 +1714,9 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid_mux, u16 seq_no, | |||
1708 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); | 1714 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); |
1709 | if (sta) | 1715 | if (sta) |
1710 | aggr_conn = sta->aggr_conn; | 1716 | aggr_conn = sta->aggr_conn; |
1711 | } else | 1717 | } else { |
1712 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1718 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1719 | } | ||
1713 | 1720 | ||
1714 | if (!aggr_conn) | 1721 | if (!aggr_conn) |
1715 | return; | 1722 | return; |
@@ -1803,8 +1810,9 @@ void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid_mux) | |||
1803 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); | 1810 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); |
1804 | if (sta) | 1811 | if (sta) |
1805 | aggr_conn = sta->aggr_conn; | 1812 | aggr_conn = sta->aggr_conn; |
1806 | } else | 1813 | } else { |
1807 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1814 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1815 | } | ||
1808 | 1816 | ||
1809 | if (!aggr_conn) | 1817 | if (!aggr_conn) |
1810 | return; | 1818 | return; |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 34c49547f09c..0c0e1e36e40f 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -289,8 +289,9 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, | |||
289 | ath6kl_wmi_determine_user_priority(((u8 *) llc_hdr) + | 289 | ath6kl_wmi_determine_user_priority(((u8 *) llc_hdr) + |
290 | sizeof(struct ath6kl_llc_snap_hdr), | 290 | sizeof(struct ath6kl_llc_snap_hdr), |
291 | layer2_priority); | 291 | layer2_priority); |
292 | } else | 292 | } else { |
293 | usr_pri = layer2_priority & 0x7; | 293 | usr_pri = layer2_priority & 0x7; |
294 | } | ||
294 | 295 | ||
295 | /* | 296 | /* |
296 | * Queue the EAPOL frames in the same WMM_AC_VO queue | 297 | * Queue the EAPOL frames in the same WMM_AC_VO queue |
@@ -359,8 +360,9 @@ int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb) | |||
359 | hdr_size = roundup(sizeof(struct ieee80211_qos_hdr), | 360 | hdr_size = roundup(sizeof(struct ieee80211_qos_hdr), |
360 | sizeof(u32)); | 361 | sizeof(u32)); |
361 | skb_pull(skb, hdr_size); | 362 | skb_pull(skb, hdr_size); |
362 | } else if (sub_type == cpu_to_le16(IEEE80211_STYPE_DATA)) | 363 | } else if (sub_type == cpu_to_le16(IEEE80211_STYPE_DATA)) { |
363 | skb_pull(skb, sizeof(struct ieee80211_hdr_3addr)); | 364 | skb_pull(skb, sizeof(struct ieee80211_hdr_3addr)); |
365 | } | ||
364 | 366 | ||
365 | datap = skb->data; | 367 | datap = skb->data; |
366 | llc_hdr = (struct ath6kl_llc_snap_hdr *)(datap); | 368 | llc_hdr = (struct ath6kl_llc_snap_hdr *)(datap); |
@@ -945,9 +947,9 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len) | |||
945 | ev = (struct ath6kl_wmi_regdomain *) datap; | 947 | ev = (struct ath6kl_wmi_regdomain *) datap; |
946 | reg_code = le32_to_cpu(ev->reg_code); | 948 | reg_code = le32_to_cpu(ev->reg_code); |
947 | 949 | ||
948 | if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) | 950 | if ((reg_code >> ATH6KL_COUNTRY_RD_SHIFT) & COUNTRY_ERD_FLAG) { |
949 | country = ath6kl_regd_find_country((u16) reg_code); | 951 | country = ath6kl_regd_find_country((u16) reg_code); |
950 | else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) { | 952 | } else if (!(((u16) reg_code & WORLD_SKU_MASK) == WORLD_SKU_PREFIX)) { |
951 | regpair = ath6kl_get_regpair((u16) reg_code); | 953 | regpair = ath6kl_get_regpair((u16) reg_code); |
952 | country = ath6kl_regd_find_country_by_rd((u16) reg_code); | 954 | country = ath6kl_regd_find_country_by_rd((u16) reg_code); |
953 | if (regpair) | 955 | if (regpair) |
@@ -2864,8 +2866,9 @@ int ath6kl_wmi_set_host_sleep_mode_cmd(struct wmi *wmi, u8 if_idx, | |||
2864 | if (host_mode == ATH6KL_HOST_MODE_ASLEEP) { | 2866 | if (host_mode == ATH6KL_HOST_MODE_ASLEEP) { |
2865 | ath6kl_wmi_relinquish_implicit_pstream_credits(wmi); | 2867 | ath6kl_wmi_relinquish_implicit_pstream_credits(wmi); |
2866 | cmd->asleep = cpu_to_le32(1); | 2868 | cmd->asleep = cpu_to_le32(1); |
2867 | } else | 2869 | } else { |
2868 | cmd->awake = cpu_to_le32(1); | 2870 | cmd->awake = cpu_to_le32(1); |
2871 | } | ||
2869 | 2872 | ||
2870 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, | 2873 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, |
2871 | WMI_SET_HOST_SLEEP_MODE_CMDID, | 2874 | WMI_SET_HOST_SLEEP_MODE_CMDID, |