aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/eeprom.c6
-rw-r--r--drivers/net/wireless/p54/main.c10
-rw-r--r--drivers/net/wireless/p54/txrx.c12
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index 0fe67d2da208..2fe713eda7ad 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -196,9 +196,9 @@ static int p54_generate_band(struct ieee80211_hw *dev,
196 dest->max_power = chan->max_power; 196 dest->max_power = chan->max_power;
197 priv->survey[*chan_num].channel = &tmp->channels[j]; 197 priv->survey[*chan_num].channel = &tmp->channels[j];
198 priv->survey[*chan_num].filled = SURVEY_INFO_NOISE_DBM | 198 priv->survey[*chan_num].filled = SURVEY_INFO_NOISE_DBM |
199 SURVEY_INFO_CHANNEL_TIME | 199 SURVEY_INFO_TIME |
200 SURVEY_INFO_CHANNEL_TIME_BUSY | 200 SURVEY_INFO_TIME_BUSY |
201 SURVEY_INFO_CHANNEL_TIME_TX; 201 SURVEY_INFO_TIME_TX;
202 dest->hw_value = (*chan_num); 202 dest->hw_value = (*chan_num);
203 j++; 203 j++;
204 (*chan_num)++; 204 (*chan_num)++;
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 97aeff0edb84..b9250d75d253 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -305,9 +305,9 @@ static void p54_reset_stats(struct p54_common *priv)
305 struct survey_info *info = &priv->survey[chan->hw_value]; 305 struct survey_info *info = &priv->survey[chan->hw_value];
306 306
307 /* only reset channel statistics, don't touch .filled, etc. */ 307 /* only reset channel statistics, don't touch .filled, etc. */
308 info->channel_time = 0; 308 info->time = 0;
309 info->channel_time_busy = 0; 309 info->time_busy = 0;
310 info->channel_time_tx = 0; 310 info->time_tx = 0;
311 } 311 }
312 312
313 priv->update_stats = true; 313 priv->update_stats = true;
@@ -575,6 +575,8 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
575 key->hw_key_idx = 0xff; 575 key->hw_key_idx = 0xff;
576 goto out_unlock; 576 goto out_unlock;
577 } 577 }
578
579 key->flags |= IEEE80211_KEY_FLAG_RESERVE_TAILROOM;
578 } else { 580 } else {
579 slot = key->hw_key_idx; 581 slot = key->hw_key_idx;
580 582
@@ -634,7 +636,7 @@ static int p54_get_survey(struct ieee80211_hw *dev, int idx,
634 636
635 if (in_use) { 637 if (in_use) {
636 /* test if the reported statistics are valid. */ 638 /* test if the reported statistics are valid. */
637 if (survey->channel_time != 0) { 639 if (survey->time != 0) {
638 survey->filled |= SURVEY_INFO_IN_USE; 640 survey->filled |= SURVEY_INFO_IN_USE;
639 } else { 641 } else {
640 /* 642 /*
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 153c61539ec8..24e5ff9a9272 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -587,13 +587,13 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb)
587 if (chan) { 587 if (chan) {
588 struct survey_info *survey = &priv->survey[chan->hw_value]; 588 struct survey_info *survey = &priv->survey[chan->hw_value];
589 survey->noise = clamp(priv->noise, -128, 127); 589 survey->noise = clamp(priv->noise, -128, 127);
590 survey->channel_time = priv->survey_raw.active; 590 survey->time = priv->survey_raw.active;
591 survey->channel_time_tx = priv->survey_raw.tx; 591 survey->time_tx = priv->survey_raw.tx;
592 survey->channel_time_busy = priv->survey_raw.tx + 592 survey->time_busy = priv->survey_raw.tx +
593 priv->survey_raw.cca; 593 priv->survey_raw.cca;
594 do_div(survey->channel_time, 1024); 594 do_div(survey->time, 1024);
595 do_div(survey->channel_time_tx, 1024); 595 do_div(survey->time_tx, 1024);
596 do_div(survey->channel_time_busy, 1024); 596 do_div(survey->time_busy, 1024);
597 } 597 }
598 598
599 tmp = p54_find_and_unlink_skb(priv, hdr->req_id); 599 tmp = p54_find_and_unlink_skb(priv, hdr->req_id);