main.c (825e587af2e90e9b953849f3347a01d8f383d577) | main.c (75fb4df7f804229372e073977615a149a4a28dc0) |
---|---|
1/* 2 * This file is part of wl18xx 3 * 4 * Copyright (C) 2011 Texas Instruments 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. --- 1119 unchanged lines hidden (view full) --- 1128 ret = wl18xx_acx_set_checksum_state(wl); 1129 if (ret != 0) 1130 return ret; 1131 } 1132 1133 return ret; 1134} 1135 | 1/* 2 * This file is part of wl18xx 3 * 4 * Copyright (C) 2011 Texas Instruments 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. --- 1119 unchanged lines hidden (view full) --- 1128 ret = wl18xx_acx_set_checksum_state(wl); 1129 if (ret != 0) 1130 return ret; 1131 } 1132 1133 return ret; 1134} 1135 |
1136static void wl18xx_convert_fw_status(struct wl1271 *wl, void *raw_fw_status, 1137 struct wl_fw_status *fw_status) 1138{ 1139 struct wl18xx_fw_status *int_fw_status = raw_fw_status; 1140 1141 fw_status->intr = le32_to_cpu(int_fw_status->intr); 1142 fw_status->fw_rx_counter = int_fw_status->fw_rx_counter; 1143 fw_status->drv_rx_counter = int_fw_status->drv_rx_counter; 1144 fw_status->tx_results_counter = int_fw_status->tx_results_counter; 1145 fw_status->rx_pkt_descs = int_fw_status->rx_pkt_descs; 1146 1147 fw_status->fw_localtime = le32_to_cpu(int_fw_status->fw_localtime); 1148 fw_status->link_ps_bitmap = le32_to_cpu(int_fw_status->link_ps_bitmap); 1149 fw_status->link_fast_bitmap = 1150 le32_to_cpu(int_fw_status->link_fast_bitmap); 1151 fw_status->total_released_blks = 1152 le32_to_cpu(int_fw_status->total_released_blks); 1153 fw_status->tx_total = le32_to_cpu(int_fw_status->tx_total); 1154 1155 fw_status->counters.tx_released_pkts = 1156 int_fw_status->counters.tx_released_pkts; 1157 fw_status->counters.tx_lnk_free_pkts = 1158 int_fw_status->counters.tx_lnk_free_pkts; 1159 fw_status->counters.tx_voice_released_blks = 1160 int_fw_status->counters.tx_voice_released_blks; 1161 fw_status->counters.tx_last_rate = 1162 int_fw_status->counters.tx_last_rate; 1163 1164 fw_status->log_start_addr = le32_to_cpu(int_fw_status->log_start_addr); 1165 1166 fw_status->priv = &int_fw_status->priv; 1167} 1168 |
|
1136static void wl18xx_set_tx_desc_csum(struct wl1271 *wl, 1137 struct wl1271_tx_hw_descr *desc, 1138 struct sk_buff *skb) 1139{ 1140 u32 ip_hdr_offset; 1141 struct iphdr *ip_hdr; 1142 1143 if (!checksum_param) { --- 423 unchanged lines hidden (view full) --- 1567 rate_set, hlid); 1568} 1569 1570static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, 1571 struct wl1271_link *lnk) 1572{ 1573 u8 thold; 1574 struct wl18xx_fw_status_priv *status_priv = | 1169static void wl18xx_set_tx_desc_csum(struct wl1271 *wl, 1170 struct wl1271_tx_hw_descr *desc, 1171 struct sk_buff *skb) 1172{ 1173 u32 ip_hdr_offset; 1174 struct iphdr *ip_hdr; 1175 1176 if (!checksum_param) { --- 423 unchanged lines hidden (view full) --- 1600 rate_set, hlid); 1601} 1602 1603static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, 1604 struct wl1271_link *lnk) 1605{ 1606 u8 thold; 1607 struct wl18xx_fw_status_priv *status_priv = |
1575 (struct wl18xx_fw_status_priv *)wl->fw_status_2->priv; | 1608 (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
1576 u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); 1577 1578 /* suspended links are never high priority */ 1579 if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) 1580 return false; 1581 1582 /* the priority thresholds are taken from FW */ 1583 if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && --- 5 unchanged lines hidden (view full) --- 1589 return lnk->allocated_pkts < thold; 1590} 1591 1592static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid, 1593 struct wl1271_link *lnk) 1594{ 1595 u8 thold; 1596 struct wl18xx_fw_status_priv *status_priv = | 1609 u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); 1610 1611 /* suspended links are never high priority */ 1612 if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) 1613 return false; 1614 1615 /* the priority thresholds are taken from FW */ 1616 if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && --- 5 unchanged lines hidden (view full) --- 1622 return lnk->allocated_pkts < thold; 1623} 1624 1625static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid, 1626 struct wl1271_link *lnk) 1627{ 1628 u8 thold; 1629 struct wl18xx_fw_status_priv *status_priv = |
1597 (struct wl18xx_fw_status_priv *)wl->fw_status_2->priv; | 1630 (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
1598 u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); 1599 1600 if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) 1601 thold = status_priv->tx_suspend_threshold; 1602 else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && 1603 !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) 1604 thold = status_priv->tx_fast_stop_threshold; 1605 else --- 21 unchanged lines hidden (view full) --- 1627 .calc_tx_blocks = wl18xx_calc_tx_blocks, 1628 .set_tx_desc_blocks = wl18xx_set_tx_desc_blocks, 1629 .set_tx_desc_data_len = wl18xx_set_tx_desc_data_len, 1630 .get_rx_buf_align = wl18xx_get_rx_buf_align, 1631 .get_rx_packet_len = wl18xx_get_rx_packet_len, 1632 .tx_immediate_compl = wl18xx_tx_immediate_completion, 1633 .tx_delayed_compl = NULL, 1634 .hw_init = wl18xx_hw_init, | 1631 u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); 1632 1633 if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) 1634 thold = status_priv->tx_suspend_threshold; 1635 else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && 1636 !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) 1637 thold = status_priv->tx_fast_stop_threshold; 1638 else --- 21 unchanged lines hidden (view full) --- 1660 .calc_tx_blocks = wl18xx_calc_tx_blocks, 1661 .set_tx_desc_blocks = wl18xx_set_tx_desc_blocks, 1662 .set_tx_desc_data_len = wl18xx_set_tx_desc_data_len, 1663 .get_rx_buf_align = wl18xx_get_rx_buf_align, 1664 .get_rx_packet_len = wl18xx_get_rx_packet_len, 1665 .tx_immediate_compl = wl18xx_tx_immediate_completion, 1666 .tx_delayed_compl = NULL, 1667 .hw_init = wl18xx_hw_init, |
1668 .convert_fw_status = wl18xx_convert_fw_status, |
|
1635 .set_tx_desc_csum = wl18xx_set_tx_desc_csum, 1636 .get_pg_ver = wl18xx_get_pg_ver, 1637 .set_rx_csum = wl18xx_set_rx_csum, 1638 .sta_get_ap_rate_mask = wl18xx_sta_get_ap_rate_mask, 1639 .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask, 1640 .get_mac = wl18xx_get_mac, 1641 .debugfs_init = wl18xx_debugfs_add_files, 1642 .scan_start = wl18xx_scan_start, --- 78 unchanged lines hidden (view full) --- 1721 wl->rtable = wl18xx_rtable; 1722 wl->num_tx_desc = WL18XX_NUM_TX_DESCRIPTORS; 1723 wl->num_rx_desc = WL18XX_NUM_RX_DESCRIPTORS; 1724 wl->num_channels = 2; 1725 wl->num_mac_addr = WL18XX_NUM_MAC_ADDRESSES; 1726 wl->band_rate_to_idx = wl18xx_band_rate_to_idx; 1727 wl->hw_tx_rate_tbl_size = WL18XX_CONF_HW_RXTX_RATE_MAX; 1728 wl->hw_min_ht_rate = WL18XX_CONF_HW_RXTX_RATE_MCS0; | 1669 .set_tx_desc_csum = wl18xx_set_tx_desc_csum, 1670 .get_pg_ver = wl18xx_get_pg_ver, 1671 .set_rx_csum = wl18xx_set_rx_csum, 1672 .sta_get_ap_rate_mask = wl18xx_sta_get_ap_rate_mask, 1673 .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask, 1674 .get_mac = wl18xx_get_mac, 1675 .debugfs_init = wl18xx_debugfs_add_files, 1676 .scan_start = wl18xx_scan_start, --- 78 unchanged lines hidden (view full) --- 1755 wl->rtable = wl18xx_rtable; 1756 wl->num_tx_desc = WL18XX_NUM_TX_DESCRIPTORS; 1757 wl->num_rx_desc = WL18XX_NUM_RX_DESCRIPTORS; 1758 wl->num_channels = 2; 1759 wl->num_mac_addr = WL18XX_NUM_MAC_ADDRESSES; 1760 wl->band_rate_to_idx = wl18xx_band_rate_to_idx; 1761 wl->hw_tx_rate_tbl_size = WL18XX_CONF_HW_RXTX_RATE_MAX; 1762 wl->hw_min_ht_rate = WL18XX_CONF_HW_RXTX_RATE_MCS0; |
1763 wl->fw_status_len = sizeof(struct wl18xx_fw_status); |
|
1729 wl->fw_status_priv_len = sizeof(struct wl18xx_fw_status_priv); 1730 wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); 1731 wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); 1732 1733 if (num_rx_desc_param != -1) 1734 wl->num_rx_desc = num_rx_desc_param; 1735 1736 ret = wl18xx_conf_init(wl, wl->dev); --- 200 unchanged lines hidden --- | 1764 wl->fw_status_priv_len = sizeof(struct wl18xx_fw_status_priv); 1765 wl->stats.fw_stats_len = sizeof(struct wl18xx_acx_statistics); 1766 wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); 1767 1768 if (num_rx_desc_param != -1) 1769 wl->num_rx_desc = num_rx_desc_param; 1770 1771 ret = wl18xx_conf_init(wl, wl->dev); --- 200 unchanged lines hidden --- |