From 6b5fbb827431974be23159a3637008d94059d3da Mon Sep 17 00:00:00 2001 From: Roland Vossen Date: Mon, 8 Aug 2011 15:58:20 +0200 Subject: [PATCH] --- yaml --- r: 267423 b: refs/heads/master c: d5efae41b43cb37ee215a83d2c90b7170092af17 h: refs/heads/master i: 267421: 3660824925c2c8a5f8fe9babdd35813541ce74ca 267419: 9f7d0ef15c9bc3f75e21de9a5b0f4a3b675c571d 267415: a430828c814545a7a7371d237914a4b1d3c87c1b 267407: 8fa42e6fa6ca5d6f8464d7b6ec6ae63c7d8c1540 267391: 271ef88c7ea8ea3488dda77754c9b51c60ec6e82 v: v3 --- [refs] | 2 +- .../staging/brcm80211/brcmsmac/phy/phy_lcn.c | 46 +++++++------------ 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/[refs] b/[refs] index b4d8cfa25da0..1520cb5f856b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b4d189f65245bd8e0ced3475c762d61e0caa61b +refs/heads/master: d5efae41b43cb37ee215a83d2c90b7170092af17 diff --git a/trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c b/trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c index a109866dcf26..3d140eb0bc50 100644 --- a/trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/trunk/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c @@ -4342,39 +4342,25 @@ static void wlc_lcnphy_tbl_init(struct brcms_phy *pi) } if (LCNREV_IS(pi->pubpi.phy_rev, 2)) { + const struct phytbl_info *tb; + int l; + if (CHSPEC_IS2G(pi->radio_chanspec)) { - for (idx = 0; - idx < dot11lcnphytbl_rx_gain_info_2G_rev2_sz; - idx++) - if (pi->sh->boardflags & BFL_EXTLNA) - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_extlna_2G_rev2 - [idx]); - else - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_2G_rev2 - [idx]); + l = dot11lcnphytbl_rx_gain_info_2G_rev2_sz; + if (pi->sh->boardflags & BFL_EXTLNA) + tb = dot11lcnphytbl_rx_gain_info_extlna_2G_rev2; + else + tb = dot11lcnphytbl_rx_gain_info_2G_rev2; } else { - for (idx = 0; - idx < dot11lcnphytbl_rx_gain_info_5G_rev2_sz; - idx++) - if (pi->sh->boardflags & BFL_EXTLNA_5GHz) - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_extlna_5G_rev2 - [idx]); - else - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_5G_rev2 - [idx]); + l = dot11lcnphytbl_rx_gain_info_5G_rev2_sz; + if (pi->sh->boardflags & BFL_EXTLNA_5GHz) + tb = dot11lcnphytbl_rx_gain_info_extlna_5G_rev2; + else + tb = dot11lcnphytbl_rx_gain_info_5G_rev2; } + + for (idx = 0; idx < l; idx++) + wlc_lcnphy_write_table(pi, &tb[idx]); } if ((pi->sh->boardflags & BFL_FEM)