hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/quantenna/qtnfmac/util.c
....@@ -1,20 +1,8 @@
1
-/*
2
- * Copyright (c) 2015-2016 Quantenna Communications, Inc.
3
- * All rights reserved.
4
- *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * as published by the Free Software Foundation; either version 2
8
- * of the License, or (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */
163
174 #include "util.h"
5
+#include "qtn_hw_ids.h"
186
197 void qtnf_sta_list_init(struct qtnf_sta_list *list)
208 {
....@@ -116,3 +104,20 @@
116104
117105 INIT_LIST_HEAD(&list->head);
118106 }
107
+
108
+const char *qtnf_chipid_to_string(unsigned long chip_id)
109
+{
110
+ switch (chip_id) {
111
+ case QTN_CHIP_ID_TOPAZ:
112
+ return "Topaz";
113
+ case QTN_CHIP_ID_PEARL:
114
+ return "Pearl revA";
115
+ case QTN_CHIP_ID_PEARL_B:
116
+ return "Pearl revB";
117
+ case QTN_CHIP_ID_PEARL_C:
118
+ return "Pearl revC";
119
+ default:
120
+ return "unknown";
121
+ }
122
+}
123
+EXPORT_SYMBOL_GPL(qtnf_chipid_to_string);