#include <linux/fs.h>
#include <linux/firmware.h>
#include "mt7921.h"
+#include "regd.h"
#include "mcu.h"
#include "../mt76_connac2_mac.h"
#include "../mt792x_trace.h"
#define MT_STA_BFER BIT(0)
#define MT_STA_BFEE BIT(1)
-static bool mt7921_disable_clc;
-module_param_named(disable_clc, mt7921_disable_clc, bool, 0644);
-MODULE_PARM_DESC(disable_clc, "disable CLC support");
-
int mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd,
struct sk_buff *skb, int seq)
{
u8 *clc_base = NULL, hw_encap = 0;
dev->phy.clc_chan_conf = 0xff;
- if (mt7921_disable_clc ||
- mt76_is_usb(&dev->mt76))
+ if (!mt7921_regd_clc_supported(dev))
return 0;
if (mt76_is_mmio(&dev->mt76)) {
#include "regd.h"
#include "mcu.h"
+static bool mt7921_disable_clc;
+module_param_named(disable_clc, mt7921_disable_clc, bool, 0644);
+MODULE_PARM_DESC(disable_clc, "disable CLC support");
+
+bool mt7921_regd_clc_supported(struct mt792x_dev *dev)
+{
+ if (mt7921_disable_clc ||
+ mt76_is_usb(&dev->mt76))
+ return false;
+
+ return true;
+}
+
static void
mt7921_regd_channel_update(struct wiphy *wiphy, struct mt792x_dev *dev)
{
void mt7921_regd_update(struct mt792x_dev *dev);
void mt7921_regd_notifier(struct wiphy *wiphy,
struct regulatory_request *request);
+bool mt7921_regd_clc_supported(struct mt792x_dev *dev);
#endif