Commit ea3f1865 authored by Jouni Malinen's avatar Jouni Malinen Committed by Jeff Garzik

[PATCH] hostap: Remove experimental PCI bus master/DMA code

PCI version of Prism2.5/3 has undocumented DMA support for TX/RX data,
but this seems to have some hardware bugs that prevent it from being
used properly for TX. RX side could possibly be made to work reliably.

Even though DMA support would be very useful for saving host CPU (from
about 40% to 5-10% when operating at maximum throughput), it seems to
be best to just remove this code finally. The implementation has
always been commented out by default and has received very limited
testing. The code may have already been broken number of times and I
don't have much interested in trying to verify whether it works or
not. Getting this out makes it easier to maintain the driver and
allows some cleanups that have been partly postponed because of this
experimental bus master/DMA code.
Signed-off-by: default avatarJouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 5bee720f
......@@ -343,8 +343,8 @@ enum {
PRISM2_PARAM_MONITOR_ALLOW_FCSERR = 16,
PRISM2_PARAM_HOST_ENCRYPT = 17,
PRISM2_PARAM_HOST_DECRYPT = 18,
PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX = 19,
PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX = 20,
/* PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX = 19, REMOVED 2005-08-14 */
/* PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX = 20, REMOVED 2005-08-14 */
PRISM2_PARAM_HOST_ROAMING = 21,
PRISM2_PARAM_BCRX_STA_KEY = 22,
PRISM2_PARAM_IEEE_802_1X = 23,
......
......@@ -13,37 +13,6 @@
/* Maximum number of events handler per one interrupt */
#define PRISM2_MAX_INTERRUPT_EVENTS 20
/* Use PCI bus master to copy data to/from BAP (only available for
* hostap_pci.o).
*
* Note! This is extremely experimental. PCI bus master is not supported by
* Intersil and it seems to have some problems at least on TX path (see below).
* The driver code for implementing bus master support is based on guessing
* and experimenting suitable control bits and these might not be correct.
* This code is included because using bus master makes a huge difference in
* host CPU load (something like 40% host CPU usage to 5-10% when sending or
* receiving at maximum throughput).
*
* Note2! Station firmware version 1.3.5 and primary firmware version 1.0.7
* have some fixes for PCI corruption and these (or newer) versions are
* recommended especially when using bus mastering.
*
* NOTE: PCI bus mastering code has not been updated for long time and it is
* not likely to compile and it will _not_ work as is. Only enable this if you
* are prepared to first fix the implementation..
*/
/* #define PRISM2_BUS_MASTER */
#ifdef PRISM2_BUS_MASTER
/* PCI bus master implementation seems to be broken in current
* hardware/firmware versions. Enable this to use enable command to fix
* something before starting bus master operation on TX path. This will add
* some latency and an extra interrupt to each TX packet. */
#define PRISM2_ENABLE_BEFORE_TX_BUS_MASTER
#endif /* PRISM2_BUS_MASTER */
/* Include code for downloading firmware images into volatile RAM. */
#define PRISM2_DOWNLOAD_SUPPORT
......
This diff is collapsed.
......@@ -2239,14 +2239,6 @@ static const struct iw_priv_args prism2_priv[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "host_decrypt" },
{ PRISM2_PARAM_HOST_DECRYPT,
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "gethost_decrypt" },
{ PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "busmaster_rx" },
{ PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX,
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbusmaster_rx" },
{ PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "busmaster_tx" },
{ PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX,
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getbusmaster_tx" },
#ifndef PRISM2_NO_STATION_MODES
{ PRISM2_PARAM_HOST_ROAMING,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "host_roaming" },
......@@ -2495,14 +2487,6 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
ret = -EINVAL;
break;
case PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX:
local->bus_master_threshold_rx = value;
break;
case PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX:
local->bus_master_threshold_tx = value;
break;
#ifndef PRISM2_NO_STATION_MODES
case PRISM2_PARAM_HOST_ROAMING:
if (value < 0 || value > 2) {
......@@ -2799,14 +2783,6 @@ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
*param = local->host_decrypt;
break;
case PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX:
*param = local->bus_master_threshold_rx;
break;
case PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX:
*param = local->bus_master_threshold_tx;
break;
case PRISM2_PARAM_HOST_ROAMING:
*param = local->host_roaming;
break;
......
......@@ -305,10 +305,6 @@ static int prism2_pci_probe(struct pci_dev *pdev,
goto fail;
}
#ifdef PRISM2_BUS_MASTER
pci_set_master(pdev);
#endif /* PRISM2_BUS_MASTER */
dev = prism2_init_local_data(&prism2_pci_funcs, cards_found,
&pdev->dev);
if (dev == NULL)
......
......@@ -787,10 +787,6 @@ struct local_info {
struct prism2_helper_functions *func;
int bus_master_threshold_tx;
int bus_master_threshold_rx;
u8 *bus_m1_buf;
u8 *pda;
int fw_ap;
#define PRISM2_FW_VER(major, minor, variant) \
......@@ -897,14 +893,6 @@ struct local_info {
#ifdef PRISM2_PCI
void __iomem *mem_start;
#ifdef PRISM2_BUS_MASTER
/* bus master for BAP0 (TX) */
int bus_m0_tx_idx;
u8 *bus_m0_buf;
/* bus master for BAP1 (RX) */
struct sk_buff *rx_skb;
#endif /* PRISM2_BUS_MASTER */
#endif /* PRISM2_PCI */
/* NOTE! Do not add common entries here after hardware version
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment