/* process each frame */
while ((p = head) != NULL) {
+ struct d11rxhdr *rxh;
head = head->prev;
p->prev = NULL;
wlc_rxhdr = (struct brcms_d11rxhdr *) p->data;
+ rxh = (struct d11rxhdr *)p->data;
/*
* compute the RSSI from d11rxhdr and record it in wlc_rxd11hr
*/
- wlc_phy_rssi_compute(wlc_hw->band->pi, wlc_rxhdr);
+ wlc_rxhdr->rssi = wlc_phy_rssi_compute(wlc_hw->band->pi, rxh);
brcms_c_recv(wlc_hw->wlc, p);
}
}
}
-void wlc_phy_rssi_compute(struct brcms_phy_pub *pih,
- struct brcms_d11rxhdr *wlc_rxhdr)
+int wlc_phy_rssi_compute(struct brcms_phy_pub *pih,
+ struct d11rxhdr *rxh)
{
- struct d11rxhdr *rxh = &wlc_rxhdr->rxhdr;
int rssi = le16_to_cpu(rxh->PhyRxStatus_1) & PRXS1_JSSI_MASK;
uint radioid = pih->radioid;
struct brcms_phy *pi = (struct brcms_phy *) pih;
}
end:
- wlc_rxhdr->rssi = (s8) rssi;
+ return rssi;
}
void wlc_phy_freqtrack_start(struct brcms_phy_pub *pih)
extern u16 wlc_phy_bw_state_get(struct brcms_phy_pub *ppi);
extern void wlc_phy_bw_state_set(struct brcms_phy_pub *ppi, u16 bw);
-extern void wlc_phy_rssi_compute(struct brcms_phy_pub *pih,
- struct brcms_d11rxhdr *wlc_rxhdr);
+extern int wlc_phy_rssi_compute(struct brcms_phy_pub *pih,
+ struct d11rxhdr *rxh);
extern void wlc_phy_por_inform(struct brcms_phy_pub *ppi);
extern void wlc_phy_noise_sample_intr(struct brcms_phy_pub *ppi);
extern bool wlc_phy_bist_check_phy(struct brcms_phy_pub *ppi);