Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352202
b: refs/heads/master
c: 583f816
h: refs/heads/master
v: v3
  • Loading branch information
Victor Goldenshtein authored and Luciano Coelho committed Dec 5, 2012
1 parent 04133c0 commit b41d956
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c4c45346289ec1c8a6a204e2c81325a4cf96924
refs/heads/master: 583f81644ab34a1314827a1dffc7fc8fbad7dc0f
113 changes: 65 additions & 48 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5070,20 +5070,20 @@ static struct ieee80211_rate wl1271_rates[] = {

/* can't be const, mac80211 writes to this */
static struct ieee80211_channel wl1271_channels[] = {
{ .hw_value = 1, .center_freq = 2412, .max_power = 25 },
{ .hw_value = 2, .center_freq = 2417, .max_power = 25 },
{ .hw_value = 3, .center_freq = 2422, .max_power = 25 },
{ .hw_value = 4, .center_freq = 2427, .max_power = 25 },
{ .hw_value = 5, .center_freq = 2432, .max_power = 25 },
{ .hw_value = 6, .center_freq = 2437, .max_power = 25 },
{ .hw_value = 7, .center_freq = 2442, .max_power = 25 },
{ .hw_value = 8, .center_freq = 2447, .max_power = 25 },
{ .hw_value = 9, .center_freq = 2452, .max_power = 25 },
{ .hw_value = 10, .center_freq = 2457, .max_power = 25 },
{ .hw_value = 11, .center_freq = 2462, .max_power = 25 },
{ .hw_value = 12, .center_freq = 2467, .max_power = 25 },
{ .hw_value = 13, .center_freq = 2472, .max_power = 25 },
{ .hw_value = 14, .center_freq = 2484, .max_power = 25 },
{ .hw_value = 1, .center_freq = 2412, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 2, .center_freq = 2417, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 3, .center_freq = 2422, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 4, .center_freq = 2427, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 5, .center_freq = 2432, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 6, .center_freq = 2437, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 7, .center_freq = 2442, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 8, .center_freq = 2447, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 9, .center_freq = 2452, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 10, .center_freq = 2457, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 11, .center_freq = 2462, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 12, .center_freq = 2467, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 13, .center_freq = 2472, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 14, .center_freq = 2484, .max_power = WLCORE_MAX_TXPWR },
};

/* can't be const, mac80211 writes to this */
Expand Down Expand Up @@ -5124,40 +5124,40 @@ static struct ieee80211_rate wl1271_rates_5ghz[] = {

/* 5 GHz band channels for WL1273 */
static struct ieee80211_channel wl1271_channels_5ghz[] = {
{ .hw_value = 7, .center_freq = 5035, .max_power = 25 },
{ .hw_value = 8, .center_freq = 5040, .max_power = 25 },
{ .hw_value = 9, .center_freq = 5045, .max_power = 25 },
{ .hw_value = 11, .center_freq = 5055, .max_power = 25 },
{ .hw_value = 12, .center_freq = 5060, .max_power = 25 },
{ .hw_value = 16, .center_freq = 5080, .max_power = 25 },
{ .hw_value = 34, .center_freq = 5170, .max_power = 25 },
{ .hw_value = 36, .center_freq = 5180, .max_power = 25 },
{ .hw_value = 38, .center_freq = 5190, .max_power = 25 },
{ .hw_value = 40, .center_freq = 5200, .max_power = 25 },
{ .hw_value = 42, .center_freq = 5210, .max_power = 25 },
{ .hw_value = 44, .center_freq = 5220, .max_power = 25 },
{ .hw_value = 46, .center_freq = 5230, .max_power = 25 },
{ .hw_value = 48, .center_freq = 5240, .max_power = 25 },
{ .hw_value = 52, .center_freq = 5260, .max_power = 25 },
{ .hw_value = 56, .center_freq = 5280, .max_power = 25 },
{ .hw_value = 60, .center_freq = 5300, .max_power = 25 },
{ .hw_value = 64, .center_freq = 5320, .max_power = 25 },
{ .hw_value = 100, .center_freq = 5500, .max_power = 25 },
{ .hw_value = 104, .center_freq = 5520, .max_power = 25 },
{ .hw_value = 108, .center_freq = 5540, .max_power = 25 },
{ .hw_value = 112, .center_freq = 5560, .max_power = 25 },
{ .hw_value = 116, .center_freq = 5580, .max_power = 25 },
{ .hw_value = 120, .center_freq = 5600, .max_power = 25 },
{ .hw_value = 124, .center_freq = 5620, .max_power = 25 },
{ .hw_value = 128, .center_freq = 5640, .max_power = 25 },
{ .hw_value = 132, .center_freq = 5660, .max_power = 25 },
{ .hw_value = 136, .center_freq = 5680, .max_power = 25 },
{ .hw_value = 140, .center_freq = 5700, .max_power = 25 },
{ .hw_value = 149, .center_freq = 5745, .max_power = 25 },
{ .hw_value = 153, .center_freq = 5765, .max_power = 25 },
{ .hw_value = 157, .center_freq = 5785, .max_power = 25 },
{ .hw_value = 161, .center_freq = 5805, .max_power = 25 },
{ .hw_value = 165, .center_freq = 5825, .max_power = 25 },
{ .hw_value = 7, .center_freq = 5035, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 8, .center_freq = 5040, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 9, .center_freq = 5045, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 11, .center_freq = 5055, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 12, .center_freq = 5060, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 16, .center_freq = 5080, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 34, .center_freq = 5170, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 36, .center_freq = 5180, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 38, .center_freq = 5190, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 40, .center_freq = 5200, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 42, .center_freq = 5210, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 44, .center_freq = 5220, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 46, .center_freq = 5230, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 48, .center_freq = 5240, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 52, .center_freq = 5260, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 56, .center_freq = 5280, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 60, .center_freq = 5300, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 64, .center_freq = 5320, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 100, .center_freq = 5500, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 104, .center_freq = 5520, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 108, .center_freq = 5540, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 112, .center_freq = 5560, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 116, .center_freq = 5580, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 120, .center_freq = 5600, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 124, .center_freq = 5620, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 128, .center_freq = 5640, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 132, .center_freq = 5660, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 136, .center_freq = 5680, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 140, .center_freq = 5700, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 149, .center_freq = 5745, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 153, .center_freq = 5765, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 157, .center_freq = 5785, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 161, .center_freq = 5805, .max_power = WLCORE_MAX_TXPWR },
{ .hw_value = 165, .center_freq = 5825, .max_power = WLCORE_MAX_TXPWR },
};

static struct ieee80211_supported_band wl1271_band_5ghz = {
Expand Down Expand Up @@ -5521,6 +5521,7 @@ wlcore_iface_combinations[] = {

static int wl1271_init_ieee80211(struct wl1271 *wl)
{
int i;
static const u32 cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104,
Expand Down Expand Up @@ -5582,6 +5583,22 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
ARRAY_SIZE(wl1271_channels_5ghz) >
WL1271_MAX_CHANNELS);
/*
* clear channel flags from the previous usage
* and restore max_power & max_antenna_gain values.
*/
for (i = 0; i < ARRAY_SIZE(wl1271_channels); i++) {
wl1271_band_2ghz.channels[i].flags = 0;
wl1271_band_2ghz.channels[i].max_power = WLCORE_MAX_TXPWR;
wl1271_band_2ghz.channels[i].max_antenna_gain = 0;
}

for (i = 0; i < ARRAY_SIZE(wl1271_channels_5ghz); i++) {
wl1271_band_5ghz.channels[i].flags = 0;
wl1271_band_5ghz.channels[i].max_power = WLCORE_MAX_TXPWR;
wl1271_band_5ghz.channels[i].max_antenna_gain = 0;
}

/*
* We keep local copies of the band structs because we need to
* modify them on a per-device basis.
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/wlcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
*/
#define WLCORE_NUM_MAC_ADDRESSES 3

/* wl12xx/wl18xx maximum transmission power (in dBm) */
#define WLCORE_MAX_TXPWR 25

/* forward declaration */
struct wl1271_tx_hw_descr;
enum wl_rx_buf_align;
Expand Down

0 comments on commit b41d956

Please sign in to comment.