|
@@ -1160,30 +1160,30 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
|
|
|
le16_to_cpu(inf->info.chinforesult.scanchannels);
|
|
|
|
|
|
for (i = 0, n = 0; i < HFA384x_CHINFORESULT_MAX; i++) {
|
|
|
- if (hw->channel_info.results.scanchannels & (1 << i)) {
|
|
|
- int channel =
|
|
|
- le16_to_cpu(inf->info.chinforesult.result[n].chid) -
|
|
|
- 1;
|
|
|
- hfa384x_ChInfoResultSub_t *chinforesult =
|
|
|
- &hw->channel_info.results.result[channel];
|
|
|
- chinforesult->chid = channel;
|
|
|
- chinforesult->anl =
|
|
|
- le16_to_cpu(inf->info.chinforesult.result[n].anl);
|
|
|
- chinforesult->pnl =
|
|
|
- le16_to_cpu(inf->info.chinforesult.result[n].pnl);
|
|
|
- chinforesult->active =
|
|
|
- le16_to_cpu(inf->info.chinforesult.result[n].
|
|
|
- active);
|
|
|
- pr_debug
|
|
|
- ("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n",
|
|
|
- channel + 1,
|
|
|
- chinforesult->
|
|
|
- active & HFA384x_CHINFORESULT_BSSACTIVE ? "signal"
|
|
|
- : "noise", chinforesult->anl, chinforesult->pnl,
|
|
|
- chinforesult->
|
|
|
- active & HFA384x_CHINFORESULT_PCFACTIVE ? 1 : 0);
|
|
|
- n++;
|
|
|
- }
|
|
|
+ hfa384x_ChInfoResultSub_t *result;
|
|
|
+ hfa384x_ChInfoResultSub_t *chinforesult;
|
|
|
+ int chan;
|
|
|
+
|
|
|
+ if (!(hw->channel_info.results.scanchannels & (1 << i)))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ result = &inf->info.chinforesult.result[n];
|
|
|
+ chan = le16_to_cpu(result->chid) - 1;
|
|
|
+
|
|
|
+ chinforesult = &hw->channel_info.results.result[chan];
|
|
|
+ chinforesult->chid = chan;
|
|
|
+ chinforesult->anl = le16_to_cpu(result->anl);
|
|
|
+ chinforesult->pnl = le16_to_cpu(result->pnl);
|
|
|
+ chinforesult->active = le16_to_cpu(result->active);
|
|
|
+
|
|
|
+ pr_debug("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n",
|
|
|
+ chan + 1,
|
|
|
+ (chinforesult->active & HFA384x_CHINFORESULT_BSSACTIVE)
|
|
|
+ ? "signal" : "noise",
|
|
|
+ chinforesult->anl, chinforesult->pnl,
|
|
|
+ (chinforesult->active & HFA384x_CHINFORESULT_PCFACTIVE)
|
|
|
+ ? 1 : 0);
|
|
|
+ n++;
|
|
|
}
|
|
|
atomic_set(&hw->channel_info.done, 2);
|
|
|
|