main.c (825e587af2e90e9b953849f3347a01d8f383d577) main.c (75fb4df7f804229372e073977615a149a4a28dc0)
1/*
2 * This file is part of wl1271
3 *
4 * Copyright (C) 2008-2010 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.

--- 1364 unchanged lines hidden (view full) ---

1373 data_len < sizeof(*desc) + desc->pad_len)
1374 return 0;
1375
1376 return data_len - sizeof(*desc) - desc->pad_len;
1377}
1378
1379static int wl12xx_tx_delayed_compl(struct wl1271 *wl)
1380{
1/*
2 * This file is part of wl1271
3 *
4 * Copyright (C) 2008-2010 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.

--- 1364 unchanged lines hidden (view full) ---

1373 data_len < sizeof(*desc) + desc->pad_len)
1374 return 0;
1375
1376 return data_len - sizeof(*desc) - desc->pad_len;
1377}
1378
1379static int wl12xx_tx_delayed_compl(struct wl1271 *wl)
1380{
1381 if (wl->fw_status_1->tx_results_counter ==
1381 if (wl->fw_status->tx_results_counter ==
1382 (wl->tx_results_count & 0xff))
1383 return 0;
1384
1385 return wlcore_tx_complete(wl);
1386}
1387
1388static int wl12xx_hw_init(struct wl1271 *wl)
1389{

--- 43 unchanged lines hidden (view full) ---

1433 ret = wl1271_cmd_ext_radio_parms(wl);
1434 if (ret < 0)
1435 goto out;
1436 }
1437out:
1438 return ret;
1439}
1440
1382 (wl->tx_results_count & 0xff))
1383 return 0;
1384
1385 return wlcore_tx_complete(wl);
1386}
1387
1388static int wl12xx_hw_init(struct wl1271 *wl)
1389{

--- 43 unchanged lines hidden (view full) ---

1433 ret = wl1271_cmd_ext_radio_parms(wl);
1434 if (ret < 0)
1435 goto out;
1436 }
1437out:
1438 return ret;
1439}
1440
1441static void wl12xx_convert_fw_status(struct wl1271 *wl, void *raw_fw_status,
1442 struct wl_fw_status *fw_status)
1443{
1444 struct wl12xx_fw_status *int_fw_status = raw_fw_status;
1445
1446 fw_status->intr = le32_to_cpu(int_fw_status->intr);
1447 fw_status->fw_rx_counter = int_fw_status->fw_rx_counter;
1448 fw_status->drv_rx_counter = int_fw_status->drv_rx_counter;
1449 fw_status->tx_results_counter = int_fw_status->tx_results_counter;
1450 fw_status->rx_pkt_descs = int_fw_status->rx_pkt_descs;
1451
1452 fw_status->fw_localtime = le32_to_cpu(int_fw_status->fw_localtime);
1453 fw_status->link_ps_bitmap = le32_to_cpu(int_fw_status->link_ps_bitmap);
1454 fw_status->link_fast_bitmap =
1455 le32_to_cpu(int_fw_status->link_fast_bitmap);
1456 fw_status->total_released_blks =
1457 le32_to_cpu(int_fw_status->total_released_blks);
1458 fw_status->tx_total = le32_to_cpu(int_fw_status->tx_total);
1459
1460 fw_status->counters.tx_released_pkts =
1461 int_fw_status->counters.tx_released_pkts;
1462 fw_status->counters.tx_lnk_free_pkts =
1463 int_fw_status->counters.tx_lnk_free_pkts;
1464 fw_status->counters.tx_voice_released_blks =
1465 int_fw_status->counters.tx_voice_released_blks;
1466 fw_status->counters.tx_last_rate =
1467 int_fw_status->counters.tx_last_rate;
1468
1469 fw_status->log_start_addr = le32_to_cpu(int_fw_status->log_start_addr);
1470}
1471
1441static u32 wl12xx_sta_get_ap_rate_mask(struct wl1271 *wl,
1442 struct wl12xx_vif *wlvif)
1443{
1444 return wlvif->rate_set;
1445}
1446
1447static void wl12xx_conf_init(struct wl1271 *wl)
1448{

--- 223 unchanged lines hidden (view full) ---

1672 .set_tx_desc_blocks = wl12xx_set_tx_desc_blocks,
1673 .set_tx_desc_data_len = wl12xx_set_tx_desc_data_len,
1674 .get_rx_buf_align = wl12xx_get_rx_buf_align,
1675 .get_rx_packet_len = wl12xx_get_rx_packet_len,
1676 .tx_immediate_compl = NULL,
1677 .tx_delayed_compl = wl12xx_tx_delayed_compl,
1678 .hw_init = wl12xx_hw_init,
1679 .init_vif = NULL,
1472static u32 wl12xx_sta_get_ap_rate_mask(struct wl1271 *wl,
1473 struct wl12xx_vif *wlvif)
1474{
1475 return wlvif->rate_set;
1476}
1477
1478static void wl12xx_conf_init(struct wl1271 *wl)
1479{

--- 223 unchanged lines hidden (view full) ---

1703 .set_tx_desc_blocks = wl12xx_set_tx_desc_blocks,
1704 .set_tx_desc_data_len = wl12xx_set_tx_desc_data_len,
1705 .get_rx_buf_align = wl12xx_get_rx_buf_align,
1706 .get_rx_packet_len = wl12xx_get_rx_packet_len,
1707 .tx_immediate_compl = NULL,
1708 .tx_delayed_compl = wl12xx_tx_delayed_compl,
1709 .hw_init = wl12xx_hw_init,
1710 .init_vif = NULL,
1711 .convert_fw_status = wl12xx_convert_fw_status,
1680 .sta_get_ap_rate_mask = wl12xx_sta_get_ap_rate_mask,
1681 .get_pg_ver = wl12xx_get_pg_ver,
1682 .get_mac = wl12xx_get_mac,
1683 .set_tx_desc_csum = wl12xx_set_tx_desc_csum,
1684 .set_rx_csum = NULL,
1685 .ap_get_mimo_wide_rate_mask = NULL,
1686 .debugfs_init = wl12xx_debugfs_add_files,
1687 .scan_start = wl12xx_scan_start,

--- 32 unchanged lines hidden (view full) ---

1720 wl->rtable = wl12xx_rtable;
1721 wl->num_tx_desc = WL12XX_NUM_TX_DESCRIPTORS;
1722 wl->num_rx_desc = WL12XX_NUM_RX_DESCRIPTORS;
1723 wl->num_channels = 1;
1724 wl->num_mac_addr = WL12XX_NUM_MAC_ADDRESSES;
1725 wl->band_rate_to_idx = wl12xx_band_rate_to_idx;
1726 wl->hw_tx_rate_tbl_size = WL12XX_CONF_HW_RXTX_RATE_MAX;
1727 wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0;
1712 .sta_get_ap_rate_mask = wl12xx_sta_get_ap_rate_mask,
1713 .get_pg_ver = wl12xx_get_pg_ver,
1714 .get_mac = wl12xx_get_mac,
1715 .set_tx_desc_csum = wl12xx_set_tx_desc_csum,
1716 .set_rx_csum = NULL,
1717 .ap_get_mimo_wide_rate_mask = NULL,
1718 .debugfs_init = wl12xx_debugfs_add_files,
1719 .scan_start = wl12xx_scan_start,

--- 32 unchanged lines hidden (view full) ---

1752 wl->rtable = wl12xx_rtable;
1753 wl->num_tx_desc = WL12XX_NUM_TX_DESCRIPTORS;
1754 wl->num_rx_desc = WL12XX_NUM_RX_DESCRIPTORS;
1755 wl->num_channels = 1;
1756 wl->num_mac_addr = WL12XX_NUM_MAC_ADDRESSES;
1757 wl->band_rate_to_idx = wl12xx_band_rate_to_idx;
1758 wl->hw_tx_rate_tbl_size = WL12XX_CONF_HW_RXTX_RATE_MAX;
1759 wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0;
1760 wl->fw_status_len = sizeof(struct wl12xx_fw_status);
1728 wl->fw_status_priv_len = 0;
1729 wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics);
1730 wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, &wl12xx_ht_cap);
1731 wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap);
1732 wl12xx_conf_init(wl);
1733
1734 if (!fref_param) {
1735 priv->ref_clock = pdata->board_ref_clock;

--- 125 unchanged lines hidden ---
1761 wl->fw_status_priv_len = 0;
1762 wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics);
1763 wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, &wl12xx_ht_cap);
1764 wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap);
1765 wl12xx_conf_init(wl);
1766
1767 if (!fref_param) {
1768 priv->ref_clock = pdata->board_ref_clock;

--- 125 unchanged lines hidden ---