Skip to content

Commit

Permalink
move mt76 rate power struct to mt76.h
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Jun 17, 2016
1 parent f30fa6c commit 267e959
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
12 changes: 12 additions & 0 deletions mt76.h
Expand Up @@ -226,6 +226,18 @@ enum mt76_phy_type {
MT_PHY_TYPE_VHT,
};

struct mt76_rate_power {
union {
struct {
s8 cck[4];
s8 ofdm[8];
s8 ht[16];
s8 vht[10];
};
s8 all[38];
};
};

#define mt76_rr(dev, ...) (dev)->mt76.bus->rr(&((dev)->mt76), __VA_ARGS__)
#define mt76_wr(dev, ...) (dev)->mt76.bus->wr(&((dev)->mt76), __VA_ARGS__)
#define mt76_rmw(dev, ...) (dev)->mt76.bus->rmw(&((dev)->mt76), __VA_ARGS__)
Expand Down
14 changes: 1 addition & 13 deletions mt76x2.h
Expand Up @@ -73,18 +73,6 @@ struct mt76x2_calibration {
bool channel_cal_done;
};

struct mt76x2_rate_power {
union {
struct {
s8 cck[4];
s8 ofdm[8];
s8 ht[16];
s8 vht[10];
};
s8 all[38];
};
};

struct mt76x2_dev {
struct mt76_dev mt76; /* must be first */

Expand Down Expand Up @@ -130,7 +118,7 @@ struct mt76x2_dev {

s8 target_power;
s8 target_power_delta[2];
struct mt76x2_rate_power rate_power;
struct mt76_rate_power rate_power;

u8 coverage_class;
u8 slottime;
Expand Down
2 changes: 1 addition & 1 deletion mt76x2_eeprom.c
Expand Up @@ -410,7 +410,7 @@ mt76x2_rate_power_val(u8 val)
return mt76x2_sign_extend_optional(val, 7);
}

void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76x2_rate_power *t)
void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76_rate_power *t)
{
bool is_5ghz = false;
u16 val;
Expand Down
2 changes: 1 addition & 1 deletion mt76x2_eeprom.h
Expand Up @@ -143,7 +143,7 @@ mt76x2_eeprom_get(struct mt76x2_dev *dev, enum mt76x2_eeprom_field field)
return get_unaligned_le16(dev->mt76.eeprom.data + field);
}

void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76x2_rate_power *t);
void mt76x2_get_rate_power(struct mt76x2_dev *dev, struct mt76_rate_power *t);
void mt76x2_get_power_info(struct mt76x2_dev *dev, struct mt76x2_tx_power_info *t);
int mt76x2_get_temp_comp(struct mt76x2_dev *dev, struct mt76x2_temp_comp *t);
bool mt76x2_ext_pa_enabled(struct mt76x2_dev *dev, enum nl80211_band band);
Expand Down
8 changes: 4 additions & 4 deletions mt76x2_phy.c
Expand Up @@ -81,7 +81,7 @@ mt76x2_txpower_check(int value)
}

static void
mt76x2_add_rate_power_offset(struct mt76x2_rate_power *r, int offset)
mt76x2_add_rate_power_offset(struct mt76_rate_power *r, int offset)
{
int i;

Expand All @@ -90,7 +90,7 @@ mt76x2_add_rate_power_offset(struct mt76x2_rate_power *r, int offset)
}

static void
mt76x2_limit_rate_power(struct mt76x2_rate_power *r, int limit)
mt76x2_limit_rate_power(struct mt76_rate_power *r, int limit)
{
int i;

Expand All @@ -100,7 +100,7 @@ mt76x2_limit_rate_power(struct mt76x2_rate_power *r, int limit)
}

static int
mt76x2_get_max_power(struct mt76x2_rate_power *r)
mt76x2_get_max_power(struct mt76_rate_power *r)
{
int i;
s8 ret = 0;
Expand All @@ -116,7 +116,7 @@ void mt76x2_phy_set_txpower(struct mt76x2_dev *dev)
enum nl80211_chan_width width = dev->mt76.chandef.width;
struct mt76x2_tx_power_info txp;
int txp_0, txp_1, delta = 0;
struct mt76x2_rate_power t = {};
struct mt76_rate_power t = {};

mt76x2_get_power_info(dev, &txp);

Expand Down

0 comments on commit 267e959

Please sign in to comment.