hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/marvell/libertas_tf/cmd.c
....@@ -1,11 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2008, cozybit Inc.
34 * Copyright (C) 2003-2006, Marvell International Ltd.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or (at
8
- * your option) any later version.
95 */
106 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
117
....@@ -36,10 +32,10 @@
3632 /**
3733 * lbtf_cmd_copyback - Simple callback that copies response back into command
3834 *
39
- * @priv A pointer to struct lbtf_private structure
40
- * @extra A pointer to the original command structure for which
35
+ * @priv: A pointer to struct lbtf_private structure
36
+ * @extra: A pointer to the original command structure for which
4137 * 'resp' is a response
42
- * @resp A pointer to the command response
38
+ * @resp: A pointer to the command response
4339 *
4440 * Returns: 0 on success, error on failure
4541 */
....@@ -76,7 +72,7 @@
7672 /**
7773 * lbtf_update_hw_spec: Updates the hardware details.
7874 *
79
- * @priv A pointer to struct lbtf_private structure
75
+ * @priv: A pointer to struct lbtf_private structure
8076 *
8177 * Returns: 0 on success, error on failure
8278 */
....@@ -145,8 +141,8 @@
145141 /**
146142 * lbtf_set_channel: Set the radio channel
147143 *
148
- * @priv A pointer to struct lbtf_private structure
149
- * @channel The desired channel, or 0 to clear a locked channel
144
+ * @priv: A pointer to struct lbtf_private structure
145
+ * @channel: The desired channel, or 0 to clear a locked channel
150146 *
151147 * Returns: 0 on success, error on failure
152148 */
....@@ -256,7 +252,7 @@
256252 command, le16_to_cpu(cmd->seqnum), cmdsize);
257253 lbtf_deb_hex(LBTF_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
258254
259
- ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
255
+ ret = priv->ops->hw_host_to_card(priv, MVMS_CMD, (u8 *)cmd, cmdsize);
260256 spin_unlock_irqrestore(&priv->driver_lock, flags);
261257
262258 if (ret) {
....@@ -272,7 +268,7 @@
272268 lbtf_deb_leave(LBTF_DEB_HOST);
273269 }
274270
275
-/**
271
+/*
276272 * This function inserts command node to cmdfreeq
277273 * after cleans it. Requires priv->driver_lock held.
278274 */
....@@ -438,7 +434,7 @@
438434 /**
439435 * lbtf_allocate_cmd_buffer - Allocates cmd buffer, links it to free cmd queue
440436 *
441
- * @priv A pointer to struct lbtf_private structure
437
+ * @priv: A pointer to struct lbtf_private structure
442438 *
443439 * Returns: 0 on success.
444440 */
....@@ -486,7 +482,7 @@
486482 /**
487483 * lbtf_free_cmd_buffer - Frees the cmd buffer.
488484 *
489
- * @priv A pointer to struct lbtf_private structure
485
+ * @priv: A pointer to struct lbtf_private structure
490486 *
491487 * Returns: 0
492488 */
....@@ -523,7 +519,7 @@
523519 /**
524520 * lbtf_get_cmd_ctrl_node - Gets free cmd node from free cmd queue.
525521 *
526
- * @priv A pointer to struct lbtf_private structure
522
+ * @priv: A pointer to struct lbtf_private structure
527523 *
528524 * Returns: pointer to a struct cmd_ctrl_node or NULL if none available.
529525 */
....@@ -557,7 +553,7 @@
557553 /**
558554 * lbtf_execute_next_command: execute next command in cmd pending queue.
559555 *
560
- * @priv A pointer to struct lbtf_private structure
556
+ * @priv: A pointer to struct lbtf_private structure
561557 *
562558 * Returns: 0 on success.
563559 */
....@@ -737,10 +733,9 @@
737733 respcmd = le16_to_cpu(resp->command);
738734 result = le16_to_cpu(resp->result);
739735
740
- if (net_ratelimit())
741
- pr_info("libertastf: cmd response 0x%04x, seq %d, size %d\n",
742
- respcmd, le16_to_cpu(resp->seqnum),
743
- le16_to_cpu(resp->size));
736
+ lbtf_deb_cmd("libertastf: cmd response 0x%04x, seq %d, size %d\n",
737
+ respcmd, le16_to_cpu(resp->seqnum),
738
+ le16_to_cpu(resp->size));
744739
745740 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
746741 spin_unlock_irqrestore(&priv->driver_lock, flags);