Skip to content

Commit

Permalink
mt7603: remove unnecessary mcu register read function
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Nov 1, 2017
1 parent ded88cd commit 51a6764
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion mt7603.h
Expand Up @@ -230,7 +230,6 @@ void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, int ssn,
void mt7603_mac_watchdog_reset(struct mt7603_dev *dev);

int mt7603_mcu_set_channel(struct mt7603_dev *dev);
int mt7603_mcu_reg_read(struct mt7603_dev *dev, u32 reg, u32 *val, bool rf);
int mt7603_mcu_set_eeprom(struct mt7603_dev *dev);
int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
int eifs);
Expand Down
27 changes: 0 additions & 27 deletions mt7603_mcu.c
Expand Up @@ -519,30 +519,3 @@ int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
return mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_SLOT_TIME_SET, MCU_Q_SET, NULL);
}

int mt7603_mcu_reg_read(struct mt7603_dev *dev, u32 reg, u32 *val, bool rf)
{
struct {
__le32 type;
__le32 addr;
__le32 data;
} req = {
.type = rf ? cpu_to_le32(1) : 0,
.addr = cpu_to_le32(reg),
};
struct sk_buff *skb;
__le32 *res;
int ret;

skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
ret = mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_MULTIPLE_REG_ACCESS, MCU_Q_QUERY, &skb);
if (ret)
return ret;

res = (__le32 *) skb_pull(skb, 20);
if (skb->len != 12)
return -EIO;

*val = le32_to_cpu(res[2]);
return 0;
}

0 comments on commit 51a6764

Please sign in to comment.