Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2036949ybg; Sat, 19 Oct 2019 07:12:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbePCK+ar4QfCcJFLJW1z/7CBpPQURHo3c9Rlzm2wRmoz8NsNl9Yo7MG2nXlUCaBrMXYqw X-Received: by 2002:a50:d70c:: with SMTP id t12mr15278453edi.252.1571494338208; Sat, 19 Oct 2019 07:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571494338; cv=none; d=google.com; s=arc-20160816; b=t7mlwMEsT51SUCap7/CcFaMZklhg81QfEos1URrD4ZLT9oipdHXJo8cG8pF5Mvs/G4 FgfH0iD0t9woz5QN1NRDtUr4RsrB1RUy/hgn4KTLgF/3J2Lx2DjiNSXVaklIkdBgAGtH b9mK1ZMsuUokXMMI0Q/kfgLlYgbORyi6D4FjAsav3hk9dg+TOgUduduumrzMsc41lCwG a939RGKsQ2TK4md7CYqd2/H6VofAA/EujaEKnMERR4aKLtVX2XXKn97kgYsbIvmrUdCh 5eWhoRe1vUf8cNi8Ki3Zv20DSHZPem8bNCVOK/l+yrTiCEWTUpQksRIFTff4Cd/ebnS0 hz+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M5yxLqHvJwEUftu3qq2vEcIwK5tNn7BPR5RV6UrprK4=; b=YccN0H32Yf/fE68f0xa/7UPGqrlHjJygoaQPQOSiX9XkCOI4/WffiYOXfyv61Qa3L1 AnNTWYM3fKA1+YwgfoWqCiZ+2uF60j6gX+V36G27RgBND1/opoxNTJFu7NcLqbtC6fwy 2LKITHUlsJ7FDSItNY4av6XZtTOSgD3i5BMEr1WzNCF7YLpLxjFTmmLGyT3Qe6eTLock tId9RWmbcrzXbSEqtQ+2wFLjqA44rMmOw9uuzcUSQIJaUcgsqe7r7Mn7AjvWxIfh5f5Q 20rjcuJFmLSouqAf/u0zmA35I1ev6/E10OBsQT0jQzzD+IwtFQsn+yMfKPou9f3ObGaI k/ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HkEq50yY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id op4si5338956ejb.77.2019.10.19.07.11.54; Sat, 19 Oct 2019 07:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HkEq50yY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbfJSOHw (ORCPT + 99 others); Sat, 19 Oct 2019 10:07:52 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36715 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfJSOHv (ORCPT ); Sat, 19 Oct 2019 10:07:51 -0400 Received: by mail-wm1-f66.google.com with SMTP id m18so8649725wmc.1 for ; Sat, 19 Oct 2019 07:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M5yxLqHvJwEUftu3qq2vEcIwK5tNn7BPR5RV6UrprK4=; b=HkEq50yYpejf11Cniqi05m3vcZDHop3874Kzy4g2Kj12LuSSKtF+pgqnmh5Y3zNevp nNaXYI+QbTc9sSxa2WNg8u9yvGNJ/tii6rdgQ9Dr2BTsC35iaKcFWOnFjQIFKU+XTlu3 TckWfGtWEjyCeFzVldoNfcMWDAmBRmyfSMMhnMAkiuxtMTXIHKg9kR5gXvGOwXl1Rgx9 /1lVb42/u0aKnkHx64u1VKM8Uxi5c7T+6fT+w/5DAkYyHRrKbuatdcdsEl5+6FA3TDlc +ciRFO1Be6BfipSzm/xqXti7rFY8fNPMwNxLh9enEcSLAV2nxcgnLeQNS8QEAlOKFbih Tipg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M5yxLqHvJwEUftu3qq2vEcIwK5tNn7BPR5RV6UrprK4=; b=OJsIoU6XJSuVtRm6QmmOLEBoL6MR4Ry1vqNUFWknhQDEkVhouOJ8GqPPe554NF6Opu mt0KsHvyBEsVZh4ICuBjXBLcaQ6zYJj/gNySNByyyPA/AqYgHKznaZu9MAFsB4nuPItr Po7iXmQuaL9ZjHJpLQr8iCNQKQcUQ8wnbZMrXn58SAp3DJuwVa36lkVuAxKf/0WRquMI D1l23c5SQdS5Q0YKgaFfpXfadhm4iajJFGjmpPqql7f7P7COWerDodENQcrgz0KfChn5 jUyBbn3lPALvP3jS7DzvHZM4oPnTHjmf6ceRInxODk1gYqfNxNMs3CN1UTA9lqCL1zTD 3iYw== X-Gm-Message-State: APjAAAUYA4rI+n0+a7G5RcgNO4mDYGzJmeA0XRPTVC0uA+LSnJ2nnVnP mHNCp6bFhmIJz2W33XwTwQ== X-Received: by 2002:a7b:c049:: with SMTP id u9mr11544614wmc.12.1571494067103; Sat, 19 Oct 2019 07:07:47 -0700 (PDT) Received: from ninjahub.lan (host-92-23-80-57.as13285.net. [92.23.80.57]) by smtp.googlemail.com with ESMTPSA id t4sm7893080wrm.13.2019.10.19.07.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 07:07:46 -0700 (PDT) From: Jules Irenge To: outreachy-kernel@googlegroups.com Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, jerome.pouiller@silabs.com, linux-kernel@vger.kernel.org, Jules Irenge Subject: [PATCH v1 2/5] staging: wfx: fix warning of line over 80 characters Date: Sat, 19 Oct 2019 15:07:16 +0100 Message-Id: <20191019140719.2542-3-jbi.octave@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019140719.2542-1-jbi.octave@gmail.com> References: <20191019140719.2542-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix warning of lines over 80 characters. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge --- drivers/staging/wfx/bh.c | 17 ++++-- drivers/staging/wfx/bus.h | 6 +- drivers/staging/wfx/bus_sdio.c | 3 +- drivers/staging/wfx/bus_spi.c | 9 ++- drivers/staging/wfx/data_rx.c | 15 +++-- drivers/staging/wfx/data_tx.c | 101 ++++++++++++++++++++++----------- 6 files changed, 102 insertions(+), 49 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 573216b08042..955ed3a1dd73 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -32,7 +32,8 @@ static void device_wakeup(struct wfx_dev *wdev) // completion without consume it (a kind of // wait_for_completion_done_timeout()). So we have to emulate // it. - if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, msecs_to_jiffies(2) + 1)) + if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, + msecs_to_jiffies(2) + 1)) complete(&wdev->hif.ctrl_ready); else dev_err(wdev->dev, "timeout while wake up chip\n"); @@ -179,8 +180,9 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1); if (wfx_is_secure_command(wdev, hif->id)) { - len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) - + sizeof(struct hif_sl_msg_hdr) + sizeof(struct hif_sl_tag); + len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) + + sizeof(struct hif_sl_msg_hdr) + + sizeof(struct hif_sl_tag); // AES support encryption in-place. However, mac80211 access to // 802.11 header after frame was sent (to get MAC addresses). // So, keep origin buffer clear. @@ -241,7 +243,8 @@ static void ack_sdio_data(struct wfx_dev *wdev) config_reg_read(wdev, &cfg_reg); if (cfg_reg & 0xFF) { - dev_warn(wdev->dev, "chip reports errors: %02x\n", cfg_reg & 0xFF); + dev_warn(wdev->dev, "chip reports errors: %02x\n", + cfg_reg & 0xFF); config_reg_write_bits(wdev, 0xFF, 0x00); } } @@ -268,11 +271,13 @@ static void bh_work(struct work_struct *work) if (last_op_is_rx) ack_sdio_data(wdev); - if (!wdev->hif.tx_buffers_used && !work_pending(work) && !atomic_read(&wdev->scan_in_progress)) { + if (!wdev->hif.tx_buffers_used && !work_pending(work) && + !atomic_read(&wdev->scan_in_progress)) { device_release(wdev); release_chip = true; } - _trace_bh_stats(stats_ind, stats_req, stats_cnf, wdev->hif.tx_buffers_used, release_chip); + _trace_bh_stats(stats_ind, stats_req, stats_cnf, + wdev->hif.tx_buffers_used, release_chip); } /* diff --git a/drivers/staging/wfx/bus.h b/drivers/staging/wfx/bus.h index eb77abc09ec2..62d6ecabe4cb 100644 --- a/drivers/staging/wfx/bus.h +++ b/drivers/staging/wfx/bus.h @@ -21,8 +21,10 @@ #define WFX_REG_FRAME_OUT 0x7 struct hwbus_ops { - int (*copy_from_io)(void *bus_priv, unsigned int addr, void *dst, size_t count); - int (*copy_to_io)(void *bus_priv, unsigned int addr, const void *src, size_t count); + int (*copy_from_io)(void *bus_priv, unsigned int addr, + void *dst, size_t count); + int (*copy_to_io)(void *bus_priv, unsigned int addr, + const void *src, size_t count); void (*lock)(void *bus_priv); void (*unlock)(void *bus_priv); size_t (*align_size)(void *bus_priv, size_t size); diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 184e20dfdd62..375e07d6d9ae 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -180,7 +180,8 @@ static int wfx_sdio_probe(struct sdio_func *func, } bus->of_irq = irq_of_parse_and_map(np, 0); } else { - dev_warn(&func->dev, "device is not declared in DT, features will be limited\n"); + dev_warn(&func->dev, + "device is not declared in DT, features will be limited\n"); // FIXME: ignore VID/PID and only rely on device tree // return -ENODEV; } diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index effd07957753..ab0cda1e124f 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -178,11 +178,14 @@ static int wfx_spi_probe(struct spi_device *func) return ret; // Trace below is also displayed by spi_setup() if compiled with DEBUG dev_dbg(&func->dev, "SPI params: CS=%d, mode=%d bits/word=%d speed=%d\n", - func->chip_select, func->mode, func->bits_per_word, func->max_speed_hz); + func->chip_select, func->mode, func->bits_per_word, + func->max_speed_hz); if (func->bits_per_word != 16 && func->bits_per_word != 8) - dev_warn(&func->dev, "unusual bits/word value: %d\n", func->bits_per_word); + dev_warn(&func->dev, "unusual bits/word value: %d\n", + func->bits_per_word); if (func->max_speed_hz > 49000000) - dev_warn(&func->dev, "%dHz is a very high speed\n", func->max_speed_hz); + dev_warn(&func->dev, "%dHz is a very high speed\n", + func->max_speed_hz); bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); if (!bus) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 3a79ab93e97e..522592d71aac 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -98,7 +98,8 @@ static int wfx_drop_encrypt_data(struct wfx_dev *wdev, struct hif_ind_rx *arg, s } -void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb) +void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, + struct sk_buff *skb) { int link_id = arg->rx_flags.peer_sta_id; struct ieee80211_rx_status *hdr = IEEE80211_SKB_RXCB(skb); @@ -118,7 +119,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb if (link_id && link_id <= WFX_MAX_STA_IN_AP_MODE) { entry = &wvif->link_id_db[link_id - 1]; entry->timestamp = jiffies; - if (entry->status == WFX_LINK_SOFT && ieee80211_is_data(frame->frame_control)) + if (entry->status == WFX_LINK_SOFT && + ieee80211_is_data(frame->frame_control)) early_data = true; } @@ -137,7 +139,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb goto drop; hdr->band = NL80211_BAND_2GHZ; - hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, hdr->band); + hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, + hdr->band); if (arg->rxed_rate >= 14) { hdr->encoding = RX_ENC_HT; @@ -166,7 +169,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb goto drop; if (ieee80211_is_beacon(frame->frame_control) && !arg->status && wvif->vif - && ether_addr_equal(ieee80211_get_SA(frame), wvif->vif->bss_conf.bssid)) { + && ether_addr_equal(ieee80211_get_SA(frame), + wvif->vif->bss_conf.bssid)) { const u8 *tim_ie; u8 *ies = mgmt->u.beacon.variable; size_t ies_len = skb->len - (ies - skb->data); @@ -183,7 +187,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, struct hif_ind_rx *arg, struct sk_buff *skb /* Disable beacon filter once we're associated... */ if (wvif->disable_beacon_filter && - (wvif->vif->bss_conf.assoc || wvif->vif->bss_conf.ibss_joined)) { + (wvif->vif->bss_conf.assoc || + wvif->vif->bss_conf.ibss_joined)) { wvif->disable_beacon_filter = false; schedule_work(&wvif->update_filtering_work); } diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index cf73b83ccc9e..619ab2cac5fc 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -20,7 +20,8 @@ #define WFX_LINK_ID_NO_ASSOC 15 #define WFX_LINK_ID_GC_TIMEOUT ((unsigned long)(10 * HZ)) -static int wfx_get_hw_rate(struct wfx_dev *wdev, const struct ieee80211_tx_rate *rate) +static int wfx_get_hw_rate(struct wfx_dev *wdev, + const struct ieee80211_tx_rate *rate) { if (rate->idx < 0) return -1; @@ -120,12 +121,14 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, } } -static bool tx_policy_is_equal(const struct tx_policy *a, const struct tx_policy *b) +static bool tx_policy_is_equal(const struct tx_policy *a, + const struct tx_policy *b) { return !memcmp(a->rates, b->rates, sizeof(a->rates)); } -static int wfx_tx_policy_find(struct tx_policy_cache *cache, struct tx_policy *wanted) +static int wfx_tx_policy_find(struct tx_policy_cache *cache, + struct tx_policy *wanted) { struct tx_policy *it; @@ -138,13 +141,15 @@ static int wfx_tx_policy_find(struct tx_policy_cache *cache, struct tx_policy *w return -1; } -static void wfx_tx_policy_use(struct tx_policy_cache *cache, struct tx_policy *entry) +static void wfx_tx_policy_use(struct tx_policy_cache *cache, + struct tx_policy *entry) { ++entry->usage_count; list_move(&entry->link, &cache->used); } -static int wfx_tx_policy_release(struct tx_policy_cache *cache, struct tx_policy *entry) +static int wfx_tx_policy_release(struct tx_policy_cache *cache, + struct tx_policy *entry) { int ret = --entry->usage_count; @@ -153,8 +158,9 @@ static int wfx_tx_policy_release(struct tx_policy_cache *cache, struct tx_policy return ret; } -static int wfx_tx_policy_get(struct wfx_vif *wvif, struct ieee80211_tx_rate *rates, - bool *renew) +static int wfx_tx_policy_get(struct wfx_vif *wvif, + struct ieee80211_tx_rate *rates, + bool *renew) { int idx; struct tx_policy_cache *cache = &wvif->tx_policy_cache; @@ -211,7 +217,10 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) int i; struct tx_policy_cache *cache = &wvif->tx_policy_cache; struct hif_mib_set_tx_rate_retry_policy *arg = - kzalloc(struct_size(arg, tx_rate_retry_policy, HIF_MIB_NUM_TX_RATE_RETRY_POLICIES), GFP_KERNEL); + kzalloc(struct_size(arg, + tx_rate_retry_policy, + HIF_MIB_NUM_TX_RATE_RETRY_POLICIES), + GFP_KERNEL); struct hif_mib_tx_rate_retry_policy *dst; spin_lock_bh(&cache->lock); @@ -220,7 +229,8 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) struct tx_policy *src = &cache->cache[i]; if (!src->uploaded && memzcmp(src->rates, sizeof(src->rates))) { - dst = arg->tx_rate_retry_policy + arg->num_tx_rate_policies; + dst = arg->tx_rate_retry_policy + + arg->num_tx_rate_policies; dst->policy_index = i; dst->short_retry_count = 255; @@ -326,7 +336,8 @@ int wfx_find_link_id(struct wfx_vif *wvif, const u8 *mac) return ret; } -static int wfx_map_link(struct wfx_vif *wvif, struct wfx_link_entry *link_entry, int sta_id) +static int wfx_map_link(struct wfx_vif *wvif, + struct wfx_link_entry *link_entry, int sta_id) { int ret; @@ -437,7 +448,8 @@ static bool ieee80211_is_action_back(struct ieee80211_hdr *hdr) } static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr, - struct wfx_tx_priv *tx_priv, struct ieee80211_sta *sta) + struct wfx_tx_priv *tx_priv, + struct ieee80211_sta *sta) { u32 mask = ~BIT(tx_priv->raw_link_id); @@ -447,7 +459,8 @@ static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr, wvif->pspoll_mask &= mask; } - if (tx_priv->link_id == WFX_LINK_ID_AFTER_DTIM && !wvif->mcast_buffered) { + if (tx_priv->link_id == WFX_LINK_ID_AFTER_DTIM && + !wvif->mcast_buffered) { wvif->mcast_buffered = true; if (wvif->sta_asleep_mask) schedule_work(&wvif->mcast_start_work); @@ -464,9 +477,12 @@ static void wfx_tx_manage_pm(struct wfx_vif *wvif, struct ieee80211_hdr *hdr, ieee80211_sta_set_buffered(sta, tx_priv->tid, true); } -static uint8_t wfx_tx_get_raw_link_id(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct ieee80211_hdr *hdr) +static uint8_t wfx_tx_get_raw_link_id(struct wfx_vif *wvif, + struct ieee80211_sta *sta, + struct ieee80211_hdr *hdr) { - struct wfx_sta_priv *sta_priv = sta ? (struct wfx_sta_priv *) &sta->drv_priv : NULL; + struct wfx_sta_priv *sta_priv = + sta ? (struct wfx_sta_priv *) &sta->drv_priv : NULL; const u8 *da = ieee80211_get_DA(hdr); int ret; @@ -505,8 +521,11 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) do { finished = true; for (i = 0; i < IEEE80211_TX_MAX_RATES - 1; i++) { - if (rates[i + 1].idx == rates[i].idx && rates[i].idx != -1) { - rates[i].count = max_t(int, rates[i].count, rates[i + 1].count); + if (rates[i + 1].idx == rates[i].idx && + rates[i].idx != -1) { + rates[i].count = + max_t(int, rates[i].count, + rates[i + 1].count); rates[i + 1].idx = -1; rates[i + 1].count = 0; @@ -523,12 +542,14 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) rates[i].flags &= ~IEEE80211_TX_RC_SHORT_GI; } -static uint8_t wfx_tx_get_rate_id(struct wfx_vif *wvif, struct ieee80211_tx_info *tx_info) +static uint8_t wfx_tx_get_rate_id(struct wfx_vif *wvif, + struct ieee80211_tx_info *tx_info) { bool tx_policy_renew = false; uint8_t rate_id; - rate_id = wfx_tx_policy_get(wvif, tx_info->driver_rates, &tx_policy_renew); + rate_id = wfx_tx_policy_get(wvif, + tx_info->driver_rates, &tx_policy_renew); WARN(rate_id == WFX_INVALID_RATE_ID, "unable to get a valid Tx policy"); if (tx_policy_renew) { @@ -584,7 +605,8 @@ static int wfx_tx_get_icv_len(struct ieee80211_key_conf *hw_key) return hw_key->icv_len + mic_space; } -static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct sk_buff *skb) +static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, + struct sk_buff *skb) { struct hif_msg *hif_msg; struct hif_req_tx *req; @@ -594,7 +616,8 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; int queue_id = tx_info->hw_queue; size_t offset = (size_t) skb->data & 3; - int wmsg_len = sizeof(struct hif_msg) + sizeof(struct hif_req_tx) + offset; + int wmsg_len = sizeof(struct hif_msg) + + sizeof(struct hif_req_tx) + offset; WARN(queue_id >= IEEE80211_NUM_ACS, "unsupported queue_id"); wfx_tx_fixup_rates(tx_info->driver_rates); @@ -632,7 +655,8 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct // Fill tx request req = (struct hif_req_tx *)hif_msg->body; - req->packet_id = queue_id << 16 | IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); + req->packet_id = queue_id << 16 | + IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); req->data_flags.fc_offset = offset; req->queue_id.peer_sta_id = tx_priv->raw_link_id; // Queue index are inverted between firmware and Linux @@ -655,7 +679,8 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct ieee80211_sta *sta = control ? control->sta : NULL; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - size_t driver_data_room = FIELD_SIZEOF(struct ieee80211_tx_info, rate_driver_data); + size_t driver_data_room = FIELD_SIZEOF(struct ieee80211_tx_info, + rate_driver_data); compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room, "struct tx_priv is too large"); @@ -692,12 +717,15 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) skb = wfx_pending_get(wvif->wdev, arg->packet_id); if (!skb) { - dev_warn(wvif->wdev->dev, "received unknown packet_id (%#.8x) from chip\n", arg->packet_id); + dev_warn(wvif->wdev->dev, + "received unknown packet_id (%#.8x) from chip\n", + arg->packet_id); return; } tx_info = IEEE80211_SKB_CB(skb); tx_priv = wfx_skb_tx_priv(skb); - _trace_tx_stats(arg, skb, wfx_pending_get_pkt_us_delay(wvif->wdev, skb)); + _trace_tx_stats(arg, skb, + wfx_pending_get_pkt_us_delay(wvif->wdev, skb)); // You can touch to tx_priv, but don't touch to tx_info->status. tx_count = arg->ack_failures; @@ -710,9 +738,12 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) if (tx_count < rate->count && arg->status && arg->ack_failures) dev_dbg(wvif->wdev->dev, "all retries were not consumed: %d != %d\n", rate->count, tx_count); - if (tx_count <= rate->count && tx_count && arg->txed_rate != wfx_get_hw_rate(wvif->wdev, rate)) - dev_dbg(wvif->wdev->dev, "inconsistent tx_info rates: %d != %d\n", - arg->txed_rate, wfx_get_hw_rate(wvif->wdev, rate)); + if (tx_count <= rate->count && tx_count && + arg->txed_rate != wfx_get_hw_rate(wvif->wdev, rate)) + dev_dbg(wvif->wdev->dev, + "inconsistent tx_info rates: %d != %d\n", + arg->txed_rate, + wfx_get_hw_rate(wvif->wdev, rate)); if (tx_count > rate->count) { tx_count -= rate->count; } else if (!tx_count) { @@ -724,7 +755,8 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) } } if (tx_count) - dev_dbg(wvif->wdev->dev, "%d more retries than expected\n", tx_count); + dev_dbg(wvif->wdev->dev, + "%d more retries than expected\n", tx_count); skb_trim(skb, skb->len - wfx_tx_get_icv_len(tx_priv->hw_key)); // From now, you can touch to tx_info->status, but do not touch to @@ -734,9 +766,11 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) memset(tx_info->pad, 0, sizeof(tx_info->pad)); if (!arg->status) { - if (wvif->bss_loss_state && arg->packet_id == wvif->bss_loss_confirm_id) + if (wvif->bss_loss_state && + arg->packet_id == wvif->bss_loss_confirm_id) wfx_cqm_bssloss_sm(wvif, 0, 1, 0); - tx_info->status.tx_time = arg->media_delay - arg->tx_queue_delay; + tx_info->status.tx_time = + arg->media_delay - arg->tx_queue_delay; if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) tx_info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; else @@ -752,7 +786,8 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, struct hif_cnf_tx *arg) wfx_suspend_resume(wvif, &suspend); tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; } else { - if (wvif->bss_loss_state && arg->packet_id == wvif->bss_loss_confirm_id) + if (wvif->bss_loss_state && + arg->packet_id == wvif->bss_loss_confirm_id) wfx_cqm_bssloss_sm(wvif, 0, 0, 1); } wfx_pending_remove(wvif->wdev, skb); @@ -790,7 +825,9 @@ void wfx_skb_dtor(struct wfx_dev *wdev, struct sk_buff *skb) struct hif_msg *hif = (struct hif_msg *)skb->data; struct hif_req_tx *req = (struct hif_req_tx *)hif->body; struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); - unsigned int offset = sizeof(struct hif_req_tx) + sizeof(struct hif_msg) + req->data_flags.fc_offset; + unsigned int offset = sizeof(struct hif_req_tx) + + sizeof(struct hif_msg) + + req->data_flags.fc_offset; WARN_ON(!wvif); skb_pull(skb, offset); -- 2.21.0