aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/data_tx.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2022-01-13 09:55:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-25 16:19:41 +0100
commit07874db4b30a2bf872ac0ec2ff7fe224c8a3a9f5 (patch)
tree7af2f3e5ad1208304e5472e4d4e829fd556fcb27 /drivers/staging/wfx/data_tx.c
parentstaging: wfx: prefix structs hif_* with wfx_ (diff)
downloadlinux-dev-07874db4b30a2bf872ac0ec2ff7fe224c8a3a9f5.tar.xz
linux-dev-07874db4b30a2bf872ac0ec2ff7fe224c8a3a9f5.zip
staging: wfx: prefix structs tx_policy and hwbus_ops with wfx_
All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-20-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/data_tx.c')
-rw-r--r--drivers/staging/wfx/data_tx.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index c004f455bb47..fec30d773e62 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -44,7 +44,7 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev,
/* TX policy cache implementation */
-static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy,
+static void wfx_tx_policy_build(struct wfx_vif *wvif, struct wfx_tx_policy *policy,
struct ieee80211_tx_rate *rates)
{
struct wfx_dev *wdev = wvif->wdev;
@@ -66,16 +66,16 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy,
}
}
-static bool wfx_tx_policy_is_equal(const struct tx_policy *a,
- const struct tx_policy *b)
+static bool wfx_tx_policy_is_equal(const struct wfx_tx_policy *a,
+ const struct wfx_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 wfx_tx_policy_cache *cache,
+ struct wfx_tx_policy *wanted)
{
- struct tx_policy *it;
+ struct wfx_tx_policy *it;
list_for_each_entry(it, &cache->used, link)
if (wfx_tx_policy_is_equal(wanted, it))
@@ -86,15 +86,15 @@ static int wfx_tx_policy_find(struct tx_policy_cache *cache,
return -1;
}
-static void wfx_tx_policy_use(struct tx_policy_cache *cache,
- struct tx_policy *entry)
+static void wfx_tx_policy_use(struct wfx_tx_policy_cache *cache,
+ struct wfx_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 wfx_tx_policy_cache *cache,
+ struct wfx_tx_policy *entry)
{
int ret = --entry->usage_count;
@@ -107,9 +107,9 @@ 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;
- struct tx_policy wanted;
- struct tx_policy *entry;
+ struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache;
+ struct wfx_tx_policy wanted;
+ struct wfx_tx_policy *entry;
wfx_tx_policy_build(wvif, &wanted, rates);
@@ -127,7 +127,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif,
* entry in "free" list
*/
*renew = true;
- entry = list_entry(cache->free.prev, struct tx_policy, link);
+ entry = list_entry(cache->free.prev, struct wfx_tx_policy, link);
memcpy(entry->rates, wanted.rates, sizeof(entry->rates));
entry->uploaded = false;
entry->usage_count = 0;
@@ -143,7 +143,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif,
static void wfx_tx_policy_put(struct wfx_vif *wvif, int idx)
{
int usage, locked;
- struct tx_policy_cache *cache = &wvif->tx_policy_cache;
+ struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache;
if (idx == HIF_TX_RETRY_POLICY_INVALID)
return;
@@ -157,7 +157,7 @@ static void wfx_tx_policy_put(struct wfx_vif *wvif, int idx)
static int wfx_tx_policy_upload(struct wfx_vif *wvif)
{
- struct tx_policy *policies = wvif->tx_policy_cache.cache;
+ struct wfx_tx_policy *policies = wvif->tx_policy_cache.cache;
u8 tmp_rates[12];
int i, is_used;
@@ -192,7 +192,7 @@ void wfx_tx_policy_upload_work(struct work_struct *work)
void wfx_tx_policy_init(struct wfx_vif *wvif)
{
- struct tx_policy_cache *cache = &wvif->tx_policy_cache;
+ struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache;
int i;
memset(cache, 0, sizeof(*cache));
@@ -435,8 +435,8 @@ drop:
static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb)
{
- struct wfx_hif_msg *hif = (struct hif_msg *)skb->data;
- struct wfx_hif_req_tx *req = (struct hif_req_tx *)hif->body;
+ struct wfx_hif_msg *hif = (struct wfx_hif_msg *)skb->data;
+ struct wfx_hif_req_tx *req = (struct wfx_hif_req_tx *)hif->body;
unsigned int offset = sizeof(struct wfx_hif_msg) +
sizeof(struct wfx_hif_req_tx) +
req->fc_offset;