Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194755
b: refs/heads/master
c: 1d7d969
h: refs/heads/master
i:
  194753: 49f77d3
  194751: 09f4376
v: v3
  • Loading branch information
John W. Linville committed May 3, 2010
1 parent 4fdaebf commit 4122d04
Show file tree
Hide file tree
Showing 46 changed files with 2,460 additions and 518 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8478df1eab2f11aefc4b6668c5867949ab96bd7
refs/heads/master: 1d7d969dd0b467ba32cf3829e8bf104a5084150d
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ar9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2550,8 +2550,7 @@ void *ar9170_alloc(size_t priv_size)
BIT(NL80211_IFTYPE_ADHOC);
ar->hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
IEEE80211_HW_SIGNAL_DBM;

if (modparam_ht) {
ar->hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
SET_IEEE80211_DEV(hw, &pdev->dev);
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
IEEE80211_HW_SIGNAL_DBM;

hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_AP) |
Expand Down
21 changes: 19 additions & 2 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4570,6 +4570,23 @@ static void b43_op_sw_scan_complete_notifier(struct ieee80211_hw *hw)
mutex_unlock(&wl->mutex);
}

static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey)
{
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev = wl->current_dev;
struct ieee80211_conf *conf = &hw->conf;

if (idx != 0)
return -ENOENT;

survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM;
survey->noise = dev->stats.link_noise;

return 0;
}

static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.conf_tx = b43_op_conf_tx,
Expand All @@ -4589,6 +4606,7 @@ static const struct ieee80211_ops b43_hw_ops = {
.sta_notify = b43_op_sta_notify,
.sw_scan_start = b43_op_sw_scan_start_notifier,
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
.get_survey = b43_op_get_survey,
.rfkill_poll = b43_rfkill_poll,
};

Expand Down Expand Up @@ -4904,8 +4922,7 @@ static int b43_wireless_init(struct ssb_device *dev)

/* fill hw info */
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
IEEE80211_HW_SIGNAL_DBM;

hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_AP) |
Expand Down
21 changes: 19 additions & 2 deletions trunk/drivers/net/wireless/b43legacy/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3481,6 +3481,23 @@ static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw,
return 0;
}

static int b43legacy_op_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey)
{
struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
struct b43legacy_wldev *dev = wl->current_dev;
struct ieee80211_conf *conf = &hw->conf;

if (idx != 0)
return -ENOENT;

survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM;
survey->noise = dev->stats.link_noise;

return 0;
}

static const struct ieee80211_ops b43legacy_hw_ops = {
.tx = b43legacy_op_tx,
.conf_tx = b43legacy_op_conf_tx,
Expand All @@ -3493,6 +3510,7 @@ static const struct ieee80211_ops b43legacy_hw_ops = {
.start = b43legacy_op_start,
.stop = b43legacy_op_stop,
.set_tim = b43legacy_op_beacon_set_tim,
.get_survey = b43legacy_op_get_survey,
.rfkill_poll = b43legacy_rfkill_poll,
};

Expand Down Expand Up @@ -3768,8 +3786,7 @@ static int b43legacy_wireless_init(struct ssb_device *dev)

/* fill hw info */
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
IEEE80211_HW_SIGNAL_DBM;
hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_STATION) |
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,6 @@ static int iwl_mac_setup_register(struct iwl_priv *priv)

/* Tell mac80211 our characteristics */
hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM |
IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_SPECTRUM_MGMT;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3873,7 +3873,6 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)

/* Tell mac80211 our characteristics */
hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM |
IEEE80211_HW_SPECTRUM_MGMT;

if (!priv->cfg->broken_powersave)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/iwmc3200wifi/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct iwm_if_ops {
int (*disable)(struct iwm_priv *iwm);
int (*send_chunk)(struct iwm_priv *iwm, u8* buf, int count);

int (*debugfs_init)(struct iwm_priv *iwm, struct dentry *parent_dir);
void (*debugfs_init)(struct iwm_priv *iwm, struct dentry *parent_dir);
void (*debugfs_exit)(struct iwm_priv *iwm);

const char *umac_name;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwmc3200wifi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ struct iwm_debugfs {
};

#ifdef CONFIG_IWM_DEBUG
int iwm_debugfs_init(struct iwm_priv *iwm);
void iwm_debugfs_init(struct iwm_priv *iwm);
void iwm_debugfs_exit(struct iwm_priv *iwm);
#else
static inline int iwm_debugfs_init(struct iwm_priv *iwm)
static inline void iwm_debugfs_init(struct iwm_priv *iwm)
{
return 0;
}
Expand Down
47 changes: 10 additions & 37 deletions trunk/drivers/net/wireless/iwmc3200wifi/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ static struct {

#define add_dbg_module(dbg, name, id, initlevel) \
do { \
struct dentry *d; \
dbg.dbg_module[id] = (initlevel); \
d = debugfs_create_x8(name, 0600, dbg.dbgdir, \
&(dbg.dbg_module[id])); \
if (!IS_ERR(d)) \
dbg.dbg_module_dentries[id] = d; \
dbg.dbg_module_dentries[id] = \
debugfs_create_x8(name, 0600, \
dbg.dbgdir, \
&(dbg.dbg_module[id])); \
} while (0)

static int iwm_debugfs_u32_read(void *data, u64 *val)
Expand Down Expand Up @@ -422,37 +421,19 @@ static const struct file_operations iwm_debugfs_fw_err_fops = {
.read = iwm_debugfs_fw_err_read,
};

int iwm_debugfs_init(struct iwm_priv *iwm)
void iwm_debugfs_init(struct iwm_priv *iwm)
{
int i, result;
char devdir[16];
int i;

iwm->dbg.rootdir = debugfs_create_dir(KBUILD_MODNAME, NULL);
result = PTR_ERR(iwm->dbg.rootdir);
if (!result || IS_ERR(iwm->dbg.rootdir)) {
if (result == -ENODEV) {
IWM_ERR(iwm, "DebugFS (CONFIG_DEBUG_FS) not "
"enabled in kernel config\n");
result = 0; /* No debugfs support */
}
IWM_ERR(iwm, "Couldn't create rootdir: %d\n", result);
goto error;
}

snprintf(devdir, sizeof(devdir), "%s", wiphy_name(iwm_to_wiphy(iwm)));

iwm->dbg.devdir = debugfs_create_dir(devdir, iwm->dbg.rootdir);
iwm->dbg.devdir = debugfs_create_dir(wiphy_name(iwm_to_wiphy(iwm)),
iwm->dbg.rootdir);
iwm->dbg.dbgdir = debugfs_create_dir("debug", iwm->dbg.devdir);
iwm->dbg.rxdir = debugfs_create_dir("rx", iwm->dbg.devdir);
iwm->dbg.txdir = debugfs_create_dir("tx", iwm->dbg.devdir);
iwm->dbg.busdir = debugfs_create_dir("bus", iwm->dbg.devdir);
if (iwm->bus_ops->debugfs_init) {
result = iwm->bus_ops->debugfs_init(iwm, iwm->dbg.busdir);
if (result < 0) {
IWM_ERR(iwm, "Couldn't create bus entry: %d\n", result);
goto error;
}
}
if (iwm->bus_ops->debugfs_init)
iwm->bus_ops->debugfs_init(iwm, iwm->dbg.busdir);

iwm->dbg.dbg_level = IWM_DL_NONE;
iwm->dbg.dbg_level_dentry =
Expand All @@ -471,23 +452,15 @@ int iwm_debugfs_init(struct iwm_priv *iwm)
iwm->dbg.txq_dentry = debugfs_create_file("queues", 0200,
iwm->dbg.txdir, iwm,
&iwm_debugfs_txq_fops);

iwm->dbg.tx_credit_dentry = debugfs_create_file("credits", 0200,
iwm->dbg.txdir, iwm,
&iwm_debugfs_tx_credit_fops);

iwm->dbg.rx_ticket_dentry = debugfs_create_file("tickets", 0200,
iwm->dbg.rxdir, iwm,
&iwm_debugfs_rx_ticket_fops);

iwm->dbg.fw_err_dentry = debugfs_create_file("last_fw_err", 0200,
iwm->dbg.dbgdir, iwm,
&iwm_debugfs_fw_err_fops);

return 0;

error:
return result;
}

void iwm_debugfs_exit(struct iwm_priv *iwm)
Expand Down
17 changes: 2 additions & 15 deletions trunk/drivers/net/wireless/iwmc3200wifi/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,13 @@ static const struct file_operations iwm_debugfs_sdio_fops = {
.read = iwm_debugfs_sdio_read,
};

static int if_sdio_debugfs_init(struct iwm_priv *iwm, struct dentry *parent_dir)
static void if_sdio_debugfs_init(struct iwm_priv *iwm, struct dentry *parent_dir)
{
int result;
struct iwm_sdio_priv *hw = iwm_to_if_sdio(iwm);

hw->cccr_dentry = debugfs_create_file("cccr", 0200,
parent_dir, iwm,
&iwm_debugfs_sdio_fops);
result = PTR_ERR(hw->cccr_dentry);
if (IS_ERR(hw->cccr_dentry) && (result != -ENODEV)) {
IWM_ERR(iwm, "Couldn't create CCCR entry: %d\n", result);
return result;
}

return 0;
}

static void if_sdio_debugfs_exit(struct iwm_priv *iwm)
Expand Down Expand Up @@ -439,11 +431,7 @@ static int iwm_sdio_probe(struct sdio_func *func,
hw = iwm_private(iwm);
hw->iwm = iwm;

ret = iwm_debugfs_init(iwm);
if (ret < 0) {
IWM_ERR(iwm, "Debugfs registration failed\n");
goto if_free;
}
iwm_debugfs_init(iwm);

sdio_set_drvdata(func, hw);

Expand Down Expand Up @@ -472,7 +460,6 @@ static int iwm_sdio_probe(struct sdio_func *func,
destroy_workqueue(hw->isr_wq);
debugfs_exit:
iwm_debugfs_exit(iwm);
if_free:
iwm_if_free(iwm);
return ret;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ static void mac80211_hwsim_sw_scan_complete(struct ieee80211_hw *hw)
mutex_lock(&hwsim->mutex);

printk(KERN_DEBUG "hwsim sw_scan_complete\n");
hwsim->scanning = true;
hwsim->scanning = false;

mutex_unlock(&hwsim->mutex);
}
Expand Down Expand Up @@ -1299,7 +1299,8 @@ static int __init init_mac80211_hwsim(void)
hw->flags = IEEE80211_HW_MFP_CAPABLE |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_STATIC_SMPS |
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS;
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
IEEE80211_HW_AMPDU_AGGREGATION;

/* ask mac80211 to reserve space for magic */
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -3981,8 +3981,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,

hw->queues = MWL8K_TX_QUEUES;

/* Set rssi and noise values to dBm */
hw->flags |= IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_NOISE_DBM;
/* Set rssi values to dBm */
hw->flags |= IEEE80211_HW_SIGNAL_DBM;
hw->vif_data_size = sizeof(struct mwl8k_vif);
hw->sta_data_size = sizeof(struct mwl8k_sta);

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/orinoco/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ config PCMCIA_SPECTRUM
This driver requires firmware download on startup. Utilities
for downloading Symbol firmware are available at
<http://sourceforge.net/projects/orinoco/>

config ORINOCO_USB
tristate "Agere Orinoco USB support"
depends on USB && HERMES
select FW_LOADER
---help---
This driver is for USB versions of the Agere Orinoco card.
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/orinoco/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o
obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o
obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o
obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o
obj-$(CONFIG_ORINOCO_USB) += orinoco_usb.o

# Orinoco should be endian clean.
ccflags-y += -D__CHECK_ENDIAN__
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/orinoco/airport.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ airport_resume(struct macio_dev *mdev)

enable_irq(card->irq);

spin_lock_irqsave(&priv->lock, flags);
priv->hw.ops->lock_irqsave(&priv->lock, &flags);
err = orinoco_up(priv);
spin_unlock_irqrestore(&priv->lock, flags);
priv->hw.ops->unlock_irqrestore(&priv->lock, &flags);

return err;
}
Expand Down Expand Up @@ -195,7 +195,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
ssleep(1);

/* Reset it before we get the interrupt */
hermes_init(hw);
hw->ops->init(hw);

if (request_irq(card->irq, orinoco_interrupt, 0, DRIVER_NAME, priv)) {
printk(KERN_ERR PFX "Couldn't get IRQ %d\n", card->irq);
Expand All @@ -210,7 +210,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
}

/* Register an interface with the stack */
if (orinoco_if_add(priv, phys_addr, card->irq) != 0) {
if (orinoco_if_add(priv, phys_addr, card->irq, NULL) != 0) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
goto failed;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/orinoco/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int orinoco_set_channel(struct wiphy *wiphy,
if (priv->iw_mode == NL80211_IFTYPE_MONITOR) {
/* Fast channel change - no commit if successful */
hermes_t *hw = &priv->hw;
err = hermes_docmd_wait(hw, HERMES_CMD_TEST |
err = hw->ops->cmd_wait(hw, HERMES_CMD_TEST |
HERMES_TEST_SET_CHANNEL,
channel, NULL);
}
Expand Down
Loading

0 comments on commit 4122d04

Please sign in to comment.