Commit 02256930 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: use proper tx power unit

It was previously thought that FW expects tx power
in quarters of dBm.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 89c5c843
...@@ -451,9 +451,9 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif) ...@@ -451,9 +451,9 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif)
arg.channel.mode = chan_to_phymode(&conf->chandef); arg.channel.mode = chan_to_phymode(&conf->chandef);
arg.channel.min_power = 0; arg.channel.min_power = 0;
arg.channel.max_power = channel->max_power * 4; arg.channel.max_power = channel->max_power * 2;
arg.channel.max_reg_power = channel->max_reg_power * 4; arg.channel.max_reg_power = channel->max_reg_power * 2;
arg.channel.max_antenna_gain = channel->max_antenna_gain; arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
arg.ssid = arvif->u.ap.ssid; arg.ssid = arvif->u.ap.ssid;
...@@ -530,9 +530,9 @@ static int ath10k_monitor_start(struct ath10k *ar, int vdev_id) ...@@ -530,9 +530,9 @@ static int ath10k_monitor_start(struct ath10k *ar, int vdev_id)
arg.channel.mode = chan_to_phymode(&ar->hw->conf.chandef); arg.channel.mode = chan_to_phymode(&ar->hw->conf.chandef);
arg.channel.min_power = 0; arg.channel.min_power = 0;
arg.channel.max_power = channel->max_power * 4; arg.channel.max_power = channel->max_power * 2;
arg.channel.max_reg_power = channel->max_reg_power * 4; arg.channel.max_reg_power = channel->max_reg_power * 2;
arg.channel.max_antenna_gain = channel->max_antenna_gain; arg.channel.max_antenna_gain = channel->max_antenna_gain * 2;
ret = ath10k_wmi_vdev_start(ar, &arg); ret = ath10k_wmi_vdev_start(ar, &arg);
if (ret) { if (ret) {
...@@ -1376,9 +1376,9 @@ static int ath10k_update_channel_list(struct ath10k *ar) ...@@ -1376,9 +1376,9 @@ static int ath10k_update_channel_list(struct ath10k *ar)
ch->freq = channel->center_freq; ch->freq = channel->center_freq;
ch->min_power = 0; ch->min_power = 0;
ch->max_power = channel->max_power * 4; ch->max_power = channel->max_power * 2;
ch->max_reg_power = channel->max_reg_power * 4; ch->max_reg_power = channel->max_reg_power * 2;
ch->max_antenna_gain = channel->max_antenna_gain; ch->max_antenna_gain = channel->max_antenna_gain * 2;
ch->reg_class_id = 0; /* FIXME */ ch->reg_class_id = 0; /* FIXME */
/* FIXME: why use only legacy modes, why not any /* FIXME: why use only legacy modes, why not any
......
...@@ -893,6 +893,7 @@ struct wmi_channel { ...@@ -893,6 +893,7 @@ struct wmi_channel {
union { union {
__le32 reginfo0; __le32 reginfo0;
struct { struct {
/* note: power unit is 0.5 dBm */
u8 min_power; u8 min_power;
u8 max_power; u8 max_power;
u8 reg_power; u8 reg_power;
...@@ -915,7 +916,7 @@ struct wmi_channel_arg { ...@@ -915,7 +916,7 @@ struct wmi_channel_arg {
bool allow_ht; bool allow_ht;
bool allow_vht; bool allow_vht;
bool ht40plus; bool ht40plus;
/* note: power unit is 1/4th of dBm */ /* note: power unit is 0.5 dBm */
u32 min_power; u32 min_power;
u32 max_power; u32 max_power;
u32 max_reg_power; u32 max_reg_power;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment