1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2021 pureLiFi
9 #include <net/mac80211.h>
24 struct plfxlc_usb usb;
25 struct mutex mutex; /* lock to protect chip data */
26 enum unit_type unit_type;
32 struct plfxlc_mc_hash {
37 #define plfxlc_chip_dev(chip) (&(chip)->usb.intf->dev)
39 void plfxlc_chip_init(struct plfxlc_chip *chip,
40 struct ieee80211_hw *hw,
41 struct usb_interface *intf);
43 void plfxlc_chip_release(struct plfxlc_chip *chip);
45 void plfxlc_chip_disable_rxtx(struct plfxlc_chip *chip);
47 int plfxlc_chip_init_hw(struct plfxlc_chip *chip);
49 int plfxlc_chip_enable_rxtx(struct plfxlc_chip *chip);
51 int plfxlc_chip_set_rate(struct plfxlc_chip *chip, u8 rate);
53 int plfxlc_set_beacon_interval(struct plfxlc_chip *chip, u16 interval,
54 u8 dtim_period, int type);
56 int plfxlc_chip_switch_radio(struct plfxlc_chip *chip, u16 value);
58 static inline struct plfxlc_chip *plfxlc_usb_to_chip(struct plfxlc_usb
61 return container_of(usb, struct plfxlc_chip, usb);
64 static inline void plfxlc_mc_add_all(struct plfxlc_mc_hash *hash)
66 hash->low = 0xffffffff;
67 hash->high = 0xffffffff;
70 #endif /* PLFXLC_CHIP_H */