Commit fa8eeae1 authored by Solomon Peachy's avatar Solomon Peachy Committed by John W. Linville

cw1200: Remove "ITP" debug subsystem.

This can live on as an out-of-tree patch for those that care.
Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 10af87c3
......@@ -35,11 +35,6 @@ config CW1200_ETF
help
If you don't know what this is, just say N.
config CW1200_ITP
bool "Enable ITP access"
help
If you don't know what this is, just say N.
endmenu
endif
......@@ -9,7 +9,6 @@ cw1200_core-y := \
sta.o \
scan.o \
debug.o
cw1200_core-$(CONFIG_CW1200_ITP) += itp.o
cw1200_core-$(CONFIG_PM) += pm.o
# CFLAGS_sta.o += -DDEBUG
......
......@@ -559,10 +559,6 @@ int cw1200_debug_init(struct cw1200_common *priv)
priv, &fops_wsm_dumps))
goto err;
ret = cw1200_itp_init(priv);
if (ret)
goto err;
return 0;
err:
......@@ -576,7 +572,7 @@ void cw1200_debug_release(struct cw1200_common *priv)
{
struct cw1200_debug_priv *d = priv->debug;
if (d) {
cw1200_itp_release(priv);
debugfs_remove_recursive(d->debugfs_phy);
priv->debug = NULL;
kfree(d);
}
......
......@@ -12,8 +12,6 @@
#ifndef CW1200_DEBUG_H_INCLUDED
#define CW1200_DEBUG_H_INCLUDED
#include "itp.h"
struct cw1200_debug_priv {
struct dentry *debugfs_phy;
int tx;
......@@ -30,9 +28,6 @@ struct cw1200_debug_priv {
int ba_acc;
int ba_cnt_rx;
int ba_acc_rx;
#ifdef CONFIG_CW1200_ITP
struct cw1200_itp itp;
#endif /* CONFIG_CW1200_ITP */
};
int cw1200_debug_init(struct cw1200_common *priv);
......
This diff is collapsed.
/*
* ITP code for ST-Ericsson CW1200 mac80211 driver
*
* Copyright (c) 2011, ST-Ericsson
* Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef CW1200_ITP_H_INCLUDED
#define CW1200_ITP_H_INCLUDED
struct cw200_common;
struct wsm_tx_confirm;
struct dentry;
#ifdef CONFIG_CW1200_ITP
/*extern*/ struct ieee80211_channel;
#define TEST_MODE_NO_TEST (0)
#define TEST_MODE_RX_TEST (1)
#define TEST_MODE_TX_TEST (2)
#define ITP_DEFAULT_DA_ADDR {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
#define ITP_MIN_DATA_SIZE 6
#define ITP_MAX_DATA_SIZE 1600
#define ITP_TIME_THRES_US 10000
#define ITP_US_TO_MS(x) ((x)/1000)
#define ITP_MS_TO_US(x) ((x)*1000)
#define ITP_BUF_SIZE 255
enum cw1200_itp_data_modes {
ITP_DATA_ZEROS,
ITP_DATA_ONES,
ITP_DATA_ZERONES,
ITP_DATA_RANDOM,
ITP_DATA_MAX_MODE,
};
enum cw1200_itp_version_type {
ITP_CHIP_ID,
ITP_FW_VER,
};
enum cw1200_itp_preamble_type {
ITP_PREAMBLE_LONG,
ITP_PREAMBLE_SHORT,
ITP_PREAMBLE_OFDM,
ITP_PREAMBLE_MIXED,
ITP_PREAMBLE_GREENFIELD,
ITP_PREAMBLE_MAX,
};
struct cw1200_itp {
struct cw1200_common *priv;
atomic_t open_count;
atomic_t awaiting_confirm;
struct sk_buff_head log_queue;
wait_queue_head_t read_wait;
wait_queue_head_t write_wait;
wait_queue_head_t close_wait;
struct ieee80211_channel *saved_channel;
atomic_t stop_tx;
struct delayed_work tx_work;
struct delayed_work tx_finish;
spinlock_t tx_lock;
struct timespec last_sent;
atomic_t test_mode;
int rx_cnt;
long rx_rssi;
int rx_rssi_max;
int rx_rssi_min;
unsigned band;
unsigned ch;
unsigned rate;
unsigned preamble;
unsigned int number;
unsigned data_mode;
int interval_us;
int power;
u8 *data;
int hdr_len;
int data_len;
};
int cw1200_itp_init(struct cw1200_common *priv);
void cw1200_itp_release(struct cw1200_common *priv);
bool cw1200_is_itp(struct cw1200_common *priv);
bool cw1200_itp_rxed(struct cw1200_common *priv, struct sk_buff *skb);
void cw1200_itp_wake_up_tx(struct cw1200_common *priv);
int cw1200_itp_get_tx(struct cw1200_common *priv, u8 **data,
size_t *tx_len, int *burst);
bool cw1200_itp_tx_running(struct cw1200_common *priv);
#else /* CONFIG_CW1200_ITP */
static inline int cw1200_itp_init(struct cw1200_common *priv)
{
return 0;
}
static inline void cw1200_itp_release(struct cw1200_common *priv)
{
}
static inline bool cw1200_is_itp(struct cw1200_common *priv)
{
return false;
}
static inline bool cw1200_itp_rxed(struct cw1200_common *priv,
struct sk_buff *skb)
{
return false;
}
static inline void cw1200_itp_consume_txed(struct cw1200_common *priv)
{
}
static inline void cw1200_itp_wake_up_tx(struct cw1200_common *priv)
{
}
static inline int cw1200_itp_get_tx(struct cw1200_common *priv, u8 **data,
size_t *tx_len, int *burst)
{
return 0;
}
static inline bool cw1200_itp_tx_running(struct cw1200_common *priv)
{
return false;
}
#endif /* CONFIG_CW1200_ITP */
#endif /* CW1200_ITP_H_INCLUDED */
......@@ -861,9 +861,6 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv,
pr_debug("[TX] TX confirm: %d, %d.\n",
arg->status, arg->ack_failures);
if (cw1200_itp_tx_running(priv))
return;
if (priv->mode == NL80211_IFTYPE_UNSPECIFIED) {
/* STA is stopped. */
return;
......@@ -1001,8 +998,7 @@ void cw1200_skb_dtor(struct cw1200_common *priv,
txpriv->raw_link_id, txpriv->tid);
tx_policy_put(priv, txpriv->rate_id);
}
if (!cw1200_is_itp(priv))
ieee80211_tx_status(priv->hw, skb);
ieee80211_tx_status(priv->hw, skb);
}
void cw1200_rx_cb(struct cw1200_common *priv,
......@@ -1205,9 +1201,7 @@ void cw1200_rx_cb(struct cw1200_common *priv,
grace_period = 1 * HZ;
cw1200_pm_stay_awake(&priv->pm_state, grace_period);
if (cw1200_itp_rxed(priv, skb)) {
consume_skb(skb);
} else if (early_data) {
if (early_data) {
spin_lock_bh(&priv->ps_state_lock);
/* Double-check status with lock held */
if (entry->status == CW1200_LINK_SOFT)
......
......@@ -21,7 +21,6 @@
#include "bh.h"
#include "sta.h"
#include "debug.h"
#include "itp.h"
#define WSM_CMD_TIMEOUT (2 * HZ) /* With respect to interrupt loss */
#define WSM_CMD_START_TIMEOUT (7 * HZ)
......@@ -1733,12 +1732,6 @@ int wsm_get_tx(struct cw1200_common *priv, u8 **data,
/* More is used only for broadcasts. */
bool more = false;
#ifdef CONFIG_CW1200_ITP
count = cw1200_itp_get_tx(priv, data, tx_len, burst);
if (count)
return count;
#endif
if (priv->wsm_cmd.ptr) { /* CMD request */
++count;
spin_lock(&priv->wsm_cmd.lock);
......
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