summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt76x02_phy.h
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-09-22 14:45:30 +0300
committerFelix Fietkau <nbd@nbd.name>2018-10-01 13:34:01 +0300
commitb9f192b8be46ee345082d8f6e12cc54ccc2ec729 (patch)
treea22eb65e5c8e7cbf02c45a665f12ca745fc7ff85 /drivers/net/wireless/mediatek/mt76/mt76x02_phy.h
parentb6862effdc6fae95bb4287c5aa9dbc6af20427f8 (diff)
downloadlinux-b9f192b8be46ee345082d8f6e12cc54ccc2ec729.tar.xz
mt76: add mt76x02_phy_set_txpower utility routine
Add mt76x02_phy_set_txpower utility routine in mt76x02_phy.c in order to be reused in mt76x0 tx power management code. Moreover move following routines in mt76x02-lib module: - mt76x02_tx_power_mask - mt76x02_get_max_rate_power - mt76x02_limit_rate_power - mt76x02_add_rate_power_offset Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_phy.h')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x02_phy.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_phy.h b/drivers/net/wireless/mediatek/mt76/mt76x02_phy.h
new file mode 100644
index 000000000000..25567f9f5070
--- /dev/null
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_phy.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2018 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef __MT76x02_PHY_H
+#define __MT76x02_PHY_H
+
+#include "mt76x02_regs.h"
+
+void mt76x02_add_rate_power_offset(struct mt76_rate_power *r, int offset);
+void mt76x02_phy_set_txpower(struct mt76_dev *dev, int txp_0, int txp_2);
+void mt76x02_limit_rate_power(struct mt76_rate_power *r, int limit);
+int mt76x02_get_max_rate_power(struct mt76_rate_power *r);
+
+#endif /* __MT76x02_PHY_H */