Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5d8f9df authored by Kalle Valo's avatar Kalle Valo
Browse files

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: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 3629fa14
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -724,8 +724,9 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif,
			ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
				   "added bss %pM to cfg80211\n", bssid);
		kfree(ie);
	} else
	} else {
		ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "cfg80211 already has a bss\n");
	}

	return bss;
}
@@ -2848,8 +2849,9 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
	if (p.prwise_crypto_type == 0) {
		p.prwise_crypto_type = NONE_CRYPT;
		ath6kl_set_cipher(vif, 0, true);
	} else if (info->crypto.n_ciphers_pairwise == 1)
	} else if (info->crypto.n_ciphers_pairwise == 1) {
		ath6kl_set_cipher(vif, info->crypto.ciphers_pairwise[0], true);
	}

	switch (info->crypto.cipher_group) {
	case WLAN_CIPHER_SUITE_WEP40:
+6 −5
Original line number Diff line number Diff line
@@ -112,9 +112,9 @@ static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info,
		if (cur_ep_dist->endpoint == ENDPOINT_0)
			continue;

		if (cur_ep_dist->svc_id == WMI_CONTROL_SVC)
		if (cur_ep_dist->svc_id == WMI_CONTROL_SVC) {
			cur_ep_dist->cred_norm = cur_ep_dist->cred_per_msg;
		else {
		} else {
			/*
			 * For the remaining data endpoints, we assume that
			 * 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,
				}
			}

			if (list_empty(&ep->rx_bufq))
			if (list_empty(&ep->rx_bufq)) {
				packet = NULL;
			else {
			} else {
				packet = list_first_entry(&ep->rx_bufq,
						struct htc_packet, list);
				list_del(&packet->list);
@@ -2813,9 +2813,10 @@ static int ath6kl_htc_reset(struct htc_target *target)
			packet->buf = packet->buf_start;
			packet->endpoint = ENDPOINT_0;
			list_add_tail(&packet->list, &target->free_ctrl_rxbuf);
		} else
		} else {
			list_add_tail(&packet->list, &target->free_ctrl_txbuf);
		}
	}

	return 0;
}
+4 −2
Original line number Diff line number Diff line
@@ -690,9 +690,10 @@ void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast)
		cfg80211_michael_mic_failure(vif->ndev, sta->mac,
					     NL80211_KEYTYPE_PAIRWISE, keyid,
					     tsc, GFP_KERNEL);
	} else
	} else {
		ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast);
	}
}

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)
	if (test_bit(CONNECTED, &vif->flags)) {
		netif_carrier_on(dev);
		netif_wake_queue(dev);
	} else
	} else {
		netif_carrier_off(dev);
	}

	return 0;
}
+6 −5
Original line number Diff line number Diff line
@@ -425,8 +425,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
			memcpy(tbuf, buf, len);

		bounced = true;
	} else
	} else {
		tbuf = buf;
	}

	ret = ath6kl_sdio_io(ar_sdio->func, request, addr, tbuf, len);
	if ((request & HIF_READ) && bounced)
@@ -441,9 +442,9 @@ static int ath6kl_sdio_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
static void __ath6kl_sdio_write_async(struct ath6kl_sdio *ar_sdio,
				      struct bus_request *req)
{
	if (req->scat_req)
	if (req->scat_req) {
		ath6kl_sdio_scat_rw(ar_sdio, req);
	else {
	} else {
		void *context;
		int status;

@@ -673,9 +674,9 @@ static int ath6kl_sdio_async_rw_scatter(struct ath6kl *ar,
		   "hif-scatter: total len: %d scatter entries: %d\n",
		   scat_req->len, scat_req->scat_entries);

	if (request & HIF_SYNCHRONOUS)
	if (request & HIF_SYNCHRONOUS) {
		status = ath6kl_sdio_scat_rw(ar_sdio, scat_req->busrequest);
	else {
	} else {
		spin_lock_bh(&ar_sdio->wr_async_lock);
		list_add_tail(&scat_req->busrequest->list, &ar_sdio->wr_asyncq);
		spin_unlock_bh(&ar_sdio->wr_async_lock);
+16 −8
Original line number Diff line number Diff line
@@ -125,8 +125,9 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn,
		*flags |= WMI_DATA_HDR_FLAGS_UAPSD;
		spin_unlock_bh(&conn->psq_lock);
		return false;
	} else if (!conn->apsd_info)
	} else if (!conn->apsd_info) {
		return false;
	}

	if (test_bit(WMM_ENABLED, &vif->flags)) {
		ether_type = be16_to_cpu(datap->h_proto);
@@ -316,8 +317,9 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
		cookie = NULL;
		ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n",
			   skb, skb->len);
	} else
	} else {
		cookie = ath6kl_alloc_cookie(ar);
	}

	if (cookie == NULL) {
		spin_unlock_bh(&ar->lock);
@@ -449,8 +451,9 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
			if (ret)
				goto fail_tx;
		}
	} else
	} else {
		goto fail_tx;
	}

	spin_lock_bh(&ar->lock);

@@ -1088,8 +1091,9 @@ static void aggr_deque_frms(struct aggr_info_conn *agg_conn, u8 tid,
			else
				skb_queue_tail(&rxtid->q, node->skb);
			node->skb = NULL;
		} else
		} else {
			stats->num_hole++;
		}

		rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next);
		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)
			if (!conn)
				return;
			aggr_conn = conn->aggr_conn;
		} else
		} else {
			aggr_conn = vif->aggr_cntxt->aggr_conn;
		}

		if (aggr_process_recv_frm(aggr_conn, tid, seq_no,
					  is_amsdu, skb)) {
			/* aggregation code will handle the skb */
			return;
		}
	} else if (!is_broadcast_ether_addr(datap->h_dest))
	} else if (!is_broadcast_ether_addr(datap->h_dest)) {
		vif->net_stats.multicast++;
	}

	ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb);
}
@@ -1708,8 +1714,9 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid_mux, u16 seq_no,
		sta = ath6kl_find_sta_by_aid(vif->ar, aid);
		if (sta)
			aggr_conn = sta->aggr_conn;
	} else
	} else {
		aggr_conn = vif->aggr_cntxt->aggr_conn;
	}

	if (!aggr_conn)
		return;
@@ -1803,8 +1810,9 @@ void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid_mux)
		sta = ath6kl_find_sta_by_aid(vif->ar, aid);
		if (sta)
			aggr_conn = sta->aggr_conn;
	} else
	} else {
		aggr_conn = vif->aggr_cntxt->aggr_conn;
	}

	if (!aggr_conn)
		return;
Loading