Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /* Copyright (c) 2015 Quantenna Communications. All rights reserved. */
0003 
0004 #ifndef QTNFMAC_UTIL_H
0005 #define QTNFMAC_UTIL_H
0006 
0007 #include <linux/kernel.h>
0008 #include "core.h"
0009 
0010 const char *qtnf_chipid_to_string(unsigned long chip_id);
0011 
0012 void qtnf_sta_list_init(struct qtnf_sta_list *list);
0013 
0014 struct qtnf_sta_node *qtnf_sta_list_lookup(struct qtnf_sta_list *list,
0015                        const u8 *mac);
0016 struct qtnf_sta_node *qtnf_sta_list_lookup_index(struct qtnf_sta_list *list,
0017                          size_t index);
0018 struct qtnf_sta_node *qtnf_sta_list_add(struct qtnf_vif *vif,
0019                     const u8 *mac);
0020 bool qtnf_sta_list_del(struct qtnf_vif *vif, const u8 *mac);
0021 
0022 void qtnf_sta_list_free(struct qtnf_sta_list *list);
0023 
0024 static inline size_t qtnf_sta_list_size(const struct qtnf_sta_list *list)
0025 {
0026     return atomic_read(&list->size);
0027 }
0028 
0029 static inline bool qtnf_sta_list_empty(const struct qtnf_sta_list *list)
0030 {
0031     return list_empty(&list->head);
0032 }
0033 
0034 #endif /* QTNFMAC_UTIL_H */