Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/linville/wireless-next-2.6
  • Loading branch information
davem330 committed Dec 4, 2009
2 parents 47e1c32 + 159bcfe commit 8f56874
Show file tree
Hide file tree
Showing 88 changed files with 3,161 additions and 2,262 deletions.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
S: Supported
F: drivers/net/wireless/iwlwifi/

INTEL WIRELESS MULTICOMM 3200 WIFI (iwmc3200wifi)
M: Samuel Ortiz <samuel.ortiz@intel.com>
M: Zhu Yi <yi.zhu@intel.com>
M: Intel Linux Wireless <ilw@linux.intel.com>
L: linux-wireless@vger.kernel.org
S: Supported
W: http://wireless.kernel.org/en/users/Drivers/iwmc3200wifi
F: drivers/net/wireless/iwmc3200wifi/

IOC3 ETHERNET DRIVER
M: Ralf Baechle <ralf@linux-mips.org>
L: linux-mips@linux-mips.org
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -4806,7 +4806,7 @@ static int airo_config_commit(struct net_device *dev,

static inline int sniffing_mode(struct airo_info *ai)
{
return le16_to_cpu(ai->config.rmode & RXMODE_MASK) >=
return (le16_to_cpu(ai->config.rmode) & le16_to_cpu(RXMODE_MASK)) >=
le16_to_cpu(RXMODE_RFMON);
}

Expand Down
13 changes: 4 additions & 9 deletions drivers/net/wireless/ath/ath9k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ config ATH9K

If you choose to build a module, it'll be called ath9k.

if ATH_DEBUG

config ATH9K_DEBUG
config ATH9K_DEBUGFS
bool "Atheros ath9k debugging"
depends on ATH9K
---help---
Say Y, if you need ath9k to display debug messages.
Pass the debug mask as a module parameter:

modprobe ath9k debug=0x00000200
Say Y, if you need access to ath9k's statistics for
interrupts, rate control, etc.

Look in ath9k/debug.h for possible debug masks
Also required for changing debug message flags at run time.

endif # ATH_DEBUG
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ath9k-y += beacon.o \

ath9k-$(CONFIG_PCI) += pci.o
ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o
ath9k-$(CONFIG_ATH9K_DEBUG) += debug.o
ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o

obj-$(CONFIG_ATH9K) += ath9k.o

Expand Down
10 changes: 6 additions & 4 deletions drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/device.h>
#include <linux/leds.h>

#include "rc.h"
#include "debug.h"
#include "common.h"

Expand Down Expand Up @@ -330,6 +329,7 @@ void ath_beacon_tasklet(unsigned long data);
void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif);
int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif);
void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp);
int ath_beaconq_config(struct ath_softc *sc);

/*******/
/* ANI */
Expand Down Expand Up @@ -421,8 +421,11 @@ struct ath_led {
#define SC_OP_WAIT_FOR_TX_ACK BIT(18)
#define SC_OP_BEACON_SYNC BIT(19)
#define SC_OP_BT_PRIORITY_DETECTED BIT(21)
#define SC_OP_NULLFUNC_COMPLETED BIT(22)
#define SC_OP_PS_ENABLED BIT(23)

struct ath_wiphy;
struct ath_rate_table;

struct ath_softc {
struct ieee80211_hw *hw;
Expand Down Expand Up @@ -467,9 +470,8 @@ struct ath_softc {
struct ath_rx rx;
struct ath_tx tx;
struct ath_beacon beacon;
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
const struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
const struct ath_rate_table *cur_rate_table;
enum wireless_mode cur_rate_mode;
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];

struct ath_led radio_led;
Expand All @@ -484,7 +486,7 @@ struct ath_softc {

int beacon_interval;

#ifdef CONFIG_ATH9K_DEBUG
#ifdef CONFIG_ATH9K_DEBUGFS
struct ath9k_debug debug;
#endif
struct ath_beacon_config cur_beacon_conf;
Expand Down
24 changes: 14 additions & 10 deletions drivers/net/wireless/ath/ath9k/beacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
* the operating mode of the station (AP or AdHoc). Parameters are AIFS
* settings and channel width min/max
*/
static int ath_beaconq_config(struct ath_softc *sc)
int ath_beaconq_config(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_tx_queue_info qi;
struct ath9k_tx_queue_info qi, qi_be;
int qnum;

ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi);
if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) {
Expand All @@ -37,9 +38,12 @@ static int ath_beaconq_config(struct ath_softc *sc)
qi.tqi_cwmax = 0;
} else {
/* Adhoc mode; important thing is to use 2x cwmin. */
qi.tqi_aifs = sc->beacon.beacon_qi.tqi_aifs;
qi.tqi_cwmin = 2*sc->beacon.beacon_qi.tqi_cwmin;
qi.tqi_cwmax = sc->beacon.beacon_qi.tqi_cwmax;
qnum = ath_tx_get_qnum(sc, ATH9K_TX_QUEUE_DATA,
ATH9K_WME_AC_BE);
ath9k_hw_get_txq_props(ah, qnum, &qi_be);
qi.tqi_aifs = qi_be.tqi_aifs;
qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
qi.tqi_cwmax = qi_be.tqi_cwmax;
}

if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) {
Expand All @@ -65,9 +69,9 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
struct ath_common *common = ath9k_hw_common(ah);
struct ath_desc *ds;
struct ath9k_11n_rate_series series[4];
const struct ath_rate_table *rt;
int flags, antenna, ctsrate = 0, ctsduration = 0;
u8 rate;
struct ieee80211_supported_band *sband;
u8 rate = 0;

ds = bf->bf_desc;
flags = ATH9K_TXDESC_NOACK;
Expand All @@ -91,10 +95,10 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,

ds->ds_data = bf->bf_buf_addr;

rt = sc->cur_rate_table;
rate = rt->info[0].ratecode;
sband = &sc->sbands[common->hw->conf.channel->band];
rate = sband->bitrates[0].hw_value;
if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
rate |= rt->info[0].short_preamble;
rate |= sband->bitrates[0].hw_value_short;

ath9k_hw_set11n_txdesc(ah, ds, skb->len + FCS_LEN,
ATH9K_PKT_TYPE_BEACON,
Expand Down
26 changes: 15 additions & 11 deletions drivers/net/wireless/ath/ath9k/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ static void ath9k_process_rssi(struct ath_common *common,
ATH_RSSI_EP_MULTIPLIER);
if (rx_stats->rs_rssi < 0)
rx_stats->rs_rssi = 0;
else if (rx_stats->rs_rssi > 127)
rx_stats->rs_rssi = 127;

/* Update Beacon RSSI, this is used by ANI. */
if (ieee80211_is_beacon(fc))
Expand Down Expand Up @@ -238,16 +236,8 @@ void ath9k_cmn_rx_skb_postprocess(struct ath_common *common,
/* see if any padding is done by the hw and remove it */
hdr = (struct ieee80211_hdr *) skb->data;
hdrlen = ieee80211_get_hdrlen_from_skb(skb);
padpos = 24;
fc = hdr->frame_control;
if ((fc & cpu_to_le16(IEEE80211_FCTL_FROMDS|IEEE80211_FCTL_TODS)) ==
cpu_to_le16(IEEE80211_FCTL_FROMDS|IEEE80211_FCTL_TODS)) {
padpos += 6; /* ETH_ALEN */
}
if ((fc & cpu_to_le16(IEEE80211_STYPE_QOS_DATA|IEEE80211_FCTL_FTYPE)) ==
cpu_to_le16(IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA)) {
padpos += 2;
}
padpos = ath9k_cmn_padpos(hdr->frame_control);

/* The MAC header is padded to have 32-bit boundary if the
* packet payload is non-zero. The general calculation for
Expand Down Expand Up @@ -282,6 +272,20 @@ void ath9k_cmn_rx_skb_postprocess(struct ath_common *common,
}
EXPORT_SYMBOL(ath9k_cmn_rx_skb_postprocess);

int ath9k_cmn_padpos(__le16 frame_control)
{
int padpos = 24;
if (ieee80211_has_a4(frame_control)) {
padpos += ETH_ALEN;
}
if (ieee80211_is_data_qos(frame_control)) {
padpos += IEEE80211_QOS_CTL_LEN;
}

return padpos;
}
EXPORT_SYMBOL(ath9k_cmn_padpos);

static int __init ath9k_cmn_init(void)
{
return 0;
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath9k/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct ath_buf {
dma_addr_t bf_daddr; /* physical addr of desc */
dma_addr_t bf_buf_addr; /* physical addr of data buffer */
bool bf_stale;
bool bf_isnullfunc;
u16 bf_flags;
struct ath_buf_state bf_state;
dma_addr_t bf_dmacontext;
Expand Down Expand Up @@ -122,3 +123,5 @@ void ath9k_cmn_rx_skb_postprocess(struct ath_common *common,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rxs,
bool decrypt_error);

int ath9k_cmn_padpos(__le16 frame_control);
20 changes: 8 additions & 12 deletions drivers/net/wireless/ath/ath9k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ static int ath9k_debugfs_open(struct inode *inode, struct file *file)
return 0;
}

#ifdef CONFIG_ATH_DEBUG

static ssize_t read_file_debug(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
Expand Down Expand Up @@ -71,6 +73,8 @@ static const struct file_operations fops_debug = {
.owner = THIS_MODULE
};

#endif

static ssize_t read_file_dma(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
Expand Down Expand Up @@ -255,21 +259,11 @@ static const struct file_operations fops_interrupt = {
.owner = THIS_MODULE
};

void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
void ath_debug_stat_rc(struct ath_softc *sc, int final_rate)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ieee80211_tx_rate *rates = tx_info->status.rates;
int final_ts_idx = 0, idx, i;
struct ath_rc_stats *stats;

for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
if (!rates[i].count)
break;

final_ts_idx = i;
}
idx = rates[final_ts_idx].idx;
stats = &sc->debug.stats.rcstats[idx];
stats = &sc->debug.stats.rcstats[final_rate];
stats->success++;
}

Expand Down Expand Up @@ -573,10 +567,12 @@ int ath9k_init_debug(struct ath_hw *ah)
if (!sc->debug.debugfs_phy)
goto err;

#ifdef CONFIG_ATH_DEBUG
sc->debug.debugfs_debug = debugfs_create_file("debug",
S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_debug);
if (!sc->debug.debugfs_debug)
goto err;
#endif

sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
sc->debug.debugfs_phy, sc, &fops_dma);
Expand Down
11 changes: 6 additions & 5 deletions drivers/net/wireless/ath/ath9k/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
#define DEBUG_H

#include "hw.h"
#include "rc.h"

struct ath_txq;
struct ath_buf;

#ifdef CONFIG_ATH9K_DEBUG
#ifdef CONFIG_ATH9K_DEBUGFS
#define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
#else
#define TX_STAT_INC(q, c) do { } while (0)
#endif

#ifdef CONFIG_ATH9K_DEBUG
#ifdef CONFIG_ATH9K_DEBUGFS

/**
* struct ath_interrupt_stats - Contains statistics about interrupts
Expand Down Expand Up @@ -138,7 +139,7 @@ void ath9k_exit_debug(struct ath_hw *ah);
int ath9k_debug_create_root(void);
void ath9k_debug_remove_root(void);
void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb);
void ath_debug_stat_rc(struct ath_softc *sc, int final_rate);
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq,
struct ath_buf *bf);
void ath_debug_stat_retries(struct ath_softc *sc, int rix,
Expand Down Expand Up @@ -170,7 +171,7 @@ static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
}

static inline void ath_debug_stat_rc(struct ath_softc *sc,
struct sk_buff *skb)
int final_rate)
{
}

Expand All @@ -185,6 +186,6 @@ static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix,
{
}

#endif /* CONFIG_ATH9K_DEBUG */
#endif /* CONFIG_ATH9K_DEBUGFS */

#endif /* DEBUG_H */
Loading

0 comments on commit 8f56874

Please sign in to comment.