Lines Matching refs:ar
43 int carl9170_write_reg(struct ar9170 *ar, const u32 reg, const u32 val) in carl9170_write_reg() argument
51 err = carl9170_exec_cmd(ar, CARL9170_CMD_WREG, sizeof(buf), in carl9170_write_reg()
55 wiphy_err(ar->hw->wiphy, "writing reg %#x " in carl9170_write_reg()
62 int carl9170_read_mreg(struct ar9170 *ar, const int nregs, in carl9170_read_mreg() argument
76 err = carl9170_exec_cmd(ar, CARL9170_CMD_RREG, in carl9170_read_mreg()
81 wiphy_err(ar->hw->wiphy, "reading regs failed (%d)\n", in carl9170_read_mreg()
94 int carl9170_read_reg(struct ar9170 *ar, u32 reg, u32 *val) in carl9170_read_reg() argument
96 return carl9170_read_mreg(ar, 1, ®, val); in carl9170_read_reg()
99 int carl9170_echo_test(struct ar9170 *ar, const u32 v) in carl9170_echo_test() argument
104 err = carl9170_exec_cmd(ar, CARL9170_CMD_ECHO, in carl9170_echo_test()
111 wiphy_info(ar->hw->wiphy, "wrong echo %x != %x", v, echores); in carl9170_echo_test()
118 struct carl9170_cmd *carl9170_cmd_buf(struct ar9170 *ar, in carl9170_cmd_buf() argument
132 int carl9170_reboot(struct ar9170 *ar) in carl9170_reboot() argument
137 cmd = carl9170_cmd_buf(ar, CARL9170_CMD_REBOOT_ASYNC, 0); in carl9170_reboot()
141 err = __carl9170_exec_cmd(ar, (struct carl9170_cmd *)cmd, true); in carl9170_reboot()
145 int carl9170_mac_reset(struct ar9170 *ar) in carl9170_mac_reset() argument
147 return carl9170_exec_cmd(ar, CARL9170_CMD_SWRST, in carl9170_mac_reset()
151 int carl9170_bcn_ctrl(struct ar9170 *ar, const unsigned int vif_id, in carl9170_bcn_ctrl() argument
156 cmd = carl9170_cmd_buf(ar, CARL9170_CMD_BCN_CTRL_ASYNC, in carl9170_bcn_ctrl()
166 return __carl9170_exec_cmd(ar, cmd, true); in carl9170_bcn_ctrl()
169 int carl9170_collect_tally(struct ar9170 *ar) in carl9170_collect_tally() argument
176 err = carl9170_exec_cmd(ar, CARL9170_CMD_TALLY, 0, NULL, in carl9170_collect_tally()
183 ar->tally.active += le32_to_cpu(tally.active) / tick; in carl9170_collect_tally()
184 ar->tally.cca += le32_to_cpu(tally.cca) / tick; in carl9170_collect_tally()
185 ar->tally.tx_time += le32_to_cpu(tally.tx_time) / tick; in carl9170_collect_tally()
186 ar->tally.rx_total += le32_to_cpu(tally.rx_total); in carl9170_collect_tally()
187 ar->tally.rx_overrun += le32_to_cpu(tally.rx_overrun); in carl9170_collect_tally()
189 if (ar->channel) { in carl9170_collect_tally()
190 info = &ar->survey[ar->channel->hw_value]; in carl9170_collect_tally()
191 info->channel_time = ar->tally.active; in carl9170_collect_tally()
192 info->channel_time_busy = ar->tally.cca; in carl9170_collect_tally()
193 info->channel_time_tx = ar->tally.tx_time; in carl9170_collect_tally()
202 int carl9170_powersave(struct ar9170 *ar, const bool ps) in carl9170_powersave() argument
207 cmd = carl9170_cmd_buf(ar, CARL9170_CMD_PSM_ASYNC, in carl9170_powersave()
221 return __carl9170_exec_cmd(ar, cmd, true); in carl9170_powersave()