Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118078
b: refs/heads/master
c: 0f5623c
h: refs/heads/master
v: v3
  • Loading branch information
Ursula Braun authored and Jeff Garzik committed Oct 27, 2008
1 parent 927224f commit 339afd7
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 119 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: ea2d8b59bc7b770fde03de2bb9b3ee46e8bdc8d5
refs/heads/master: 0f5623c9ebfc6576c5682ab3b335c57812f6c87e
33 changes: 22 additions & 11 deletions trunk/drivers/net/wireless/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ ath5k_pci_resume(struct pci_dev *pdev)
{
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath5k_softc *sc = hw->priv;
int err;
struct ath5k_hw *ah = sc->ah;
int i, err;

pci_restore_state(pdev);

Expand All @@ -687,6 +688,16 @@ ath5k_pci_resume(struct pci_dev *pdev)
goto err_irq;
ath5k_led_enable(sc);

/*
* Reset the key cache since some parts do not
* reset the contents on initial power up or resume.
*
* FIXME: This may need to be revisited when mac80211 becomes
* aware of suspend/resume.
*/
for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
ath5k_hw_reset_key(ah, i);

return 0;
err_irq:
free_irq(pdev->irq, sc);
Expand All @@ -707,6 +718,7 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
struct ath5k_softc *sc = hw->priv;
struct ath5k_hw *ah = sc->ah;
u8 mac[ETH_ALEN];
unsigned int i;
int ret;

ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
Expand All @@ -724,6 +736,13 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
if (ret > 0)
__set_bit(ATH_STAT_MRRETRY, sc->status);

/*
* Reset the key cache since some parts do not
* reset the contents on initial power up.
*/
for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
ath5k_hw_reset_key(ah, i);

/*
* Collect the channel list. The 802.11 layer
* is resposible for filtering this list based
Expand Down Expand Up @@ -2183,8 +2202,7 @@ ath5k_beacon_config(struct ath5k_softc *sc)
static int
ath5k_init(struct ath5k_softc *sc, bool is_resume)
{
struct ath5k_hw *ah = sc->ah;
int ret, i;
int ret;

mutex_lock(&sc->lock);

Expand Down Expand Up @@ -2217,17 +2235,10 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume)
if (ret)
goto done;

/*
* Reset the key cache since some parts do not reset the
* contents on initial power up or resume from suspend.
*/
for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
ath5k_hw_reset_key(ah, i);

__set_bit(ATH_STAT_STARTED, sc->status);

/* Set ack to be sent at low bit-rates */
ath5k_hw_set_ack_bitrate_high(ah, false);
ath5k_hw_set_ack_bitrate_high(sc->ah, false);

mod_timer(&sc->calib_tim, round_jiffies(jiffies +
msecs_to_jiffies(ath5k_calinterval * 1000)));
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
void *tmp;
int err;
u8 *end = (u8 *)eeprom + len;
u16 synth = 0;
u16 synth;
DECLARE_MAC_BUF(mac);

wrap = (struct eeprom_pda_wrap *) eeprom;
Expand Down Expand Up @@ -422,8 +422,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
entry = (void *)entry + (entry_len + 1)*2;
}

if (!synth || !priv->iq_autocal || !priv->output_limit ||
!priv->curve_data) {
if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
printk(KERN_ERR "p54: not all required entries found in eeprom!\n");
err = -EINVAL;
goto err;
Expand Down
132 changes: 66 additions & 66 deletions trunk/drivers/net/wireless/p54/p54pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,68 @@ static void p54p_tx(struct ieee80211_hw *dev, struct p54_control_hdr *data,
printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy));
}

static int p54p_open(struct ieee80211_hw *dev)
{
struct p54p_priv *priv = dev->priv;
int err;

init_completion(&priv->boot_comp);
err = request_irq(priv->pdev->irq, &p54p_interrupt,
IRQF_SHARED, "p54pci", dev);
if (err) {
printk(KERN_ERR "%s: failed to register IRQ handler\n",
wiphy_name(dev->wiphy));
return err;
}

memset(priv->ring_control, 0, sizeof(*priv->ring_control));
err = p54p_upload_firmware(dev);
if (err) {
free_irq(priv->pdev->irq, dev);
return err;
}
priv->rx_idx_data = priv->tx_idx_data = 0;
priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;

p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);

p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);

P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
P54P_READ(ring_control_base);
wmb();
udelay(10);

P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
P54P_READ(int_enable);
wmb();
udelay(10);

P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
P54P_READ(dev_int);

if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
printk(KERN_ERR "%s: Cannot boot firmware!\n",
wiphy_name(dev->wiphy));
free_irq(priv->pdev->irq, dev);
return -ETIMEDOUT;
}

P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
P54P_READ(int_enable);
wmb();
udelay(10);

P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
P54P_READ(dev_int);
wmb();
udelay(10);

return 0;
}

static void p54p_stop(struct ieee80211_hw *dev)
{
struct p54p_priv *priv = dev->priv;
Expand Down Expand Up @@ -412,68 +474,6 @@ static void p54p_stop(struct ieee80211_hw *dev)
memset(ring_control, 0, sizeof(*ring_control));
}

static int p54p_open(struct ieee80211_hw *dev)
{
struct p54p_priv *priv = dev->priv;
int err;

init_completion(&priv->boot_comp);
err = request_irq(priv->pdev->irq, &p54p_interrupt,
IRQF_SHARED, "p54pci", dev);
if (err) {
printk(KERN_ERR "%s: failed to register IRQ handler\n",
wiphy_name(dev->wiphy));
return err;
}

memset(priv->ring_control, 0, sizeof(*priv->ring_control));
err = p54p_upload_firmware(dev);
if (err) {
free_irq(priv->pdev->irq, dev);
return err;
}
priv->rx_idx_data = priv->tx_idx_data = 0;
priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;

p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);

p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);

P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
P54P_READ(ring_control_base);
wmb();
udelay(10);

P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
P54P_READ(int_enable);
wmb();
udelay(10);

P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
P54P_READ(dev_int);

if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
printk(KERN_ERR "%s: Cannot boot firmware!\n",
wiphy_name(dev->wiphy));
p54p_stop(dev);
return -ETIMEDOUT;
}

P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
P54P_READ(int_enable);
wmb();
udelay(10);

P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
P54P_READ(dev_int);
wmb();
udelay(10);

return 0;
}

static int __devinit p54p_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
Expand Down Expand Up @@ -556,13 +556,11 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
spin_lock_init(&priv->lock);
tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev);

err = p54p_open(dev);
if (err)
goto err_free_common;
p54p_open(dev);
err = p54_read_eeprom(dev);
p54p_stop(dev);
if (err)
goto err_free_common;
goto err_free_desc;

err = ieee80211_register_hw(dev);
if (err) {
Expand All @@ -575,6 +573,8 @@ static int __devinit p54p_probe(struct pci_dev *pdev,

err_free_common:
p54_free_common(dev);

err_free_desc:
pci_free_consistent(pdev, sizeof(*priv->ring_control),
priv->ring_control, priv->ring_control_dma);

Expand Down
14 changes: 1 addition & 13 deletions trunk/drivers/s390/net/qeth_l2_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));

qeth_set_allowed_threads(card, 0, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
return -ERESTARTSYS;
if (card->read.state == CH_STATE_UP &&
card->write.state == CH_STATE_UP &&
(card->state == CARD_STATE_UP)) {
Expand Down Expand Up @@ -975,12 +973,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));

qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
PRINT_WARN("set_online of card %s interrupted by user!\n",
CARD_BUS_ID(card));
return -ERESTARTSYS;
}

recover_flag = card->state;
rc = ccw_device_set_online(CARD_RDEV(card));
if (rc) {
Expand Down Expand Up @@ -1091,11 +1083,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
if (card->dev && netif_carrier_ok(card->dev))
netif_carrier_off(card->dev);
recover_flag = card->state;
if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) {
PRINT_WARN("Stopping card %s interrupted by user!\n",
CARD_BUS_ID(card));
return -ERESTARTSYS;
}
qeth_l2_stop_card(card, recovery_mode);
rc = ccw_device_set_offline(CARD_DDEV(card));
rc2 = ccw_device_set_offline(CARD_WDEV(card));
rc3 = ccw_device_set_offline(CARD_RDEV(card));
Expand Down
13 changes: 1 addition & 12 deletions trunk/drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2064,8 +2064,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));

qeth_set_allowed_threads(card, 0, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
return -ERESTARTSYS;
if (card->read.state == CH_STATE_UP &&
card->write.state == CH_STATE_UP &&
(card->state == CARD_STATE_UP)) {
Expand Down Expand Up @@ -3049,11 +3047,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));

qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
PRINT_WARN("set_online of card %s interrupted by user!\n",
CARD_BUS_ID(card));
return -ERESTARTSYS;
}

recover_flag = card->state;
rc = ccw_device_set_online(CARD_RDEV(card));
Expand Down Expand Up @@ -3170,11 +3163,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
if (card->dev && netif_carrier_ok(card->dev))
netif_carrier_off(card->dev);
recover_flag = card->state;
if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) {
PRINT_WARN("Stopping card %s interrupted by user!\n",
CARD_BUS_ID(card));
return -ERESTARTSYS;
}
qeth_l3_stop_card(card, recovery_mode);
rc = ccw_device_set_offline(CARD_DDEV(card));
rc2 = ccw_device_set_offline(CARD_WDEV(card));
rc3 = ccw_device_set_offline(CARD_RDEV(card));
Expand Down
11 changes: 6 additions & 5 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
* ieee80211_beacon_get - beacon generation function
* @hw: pointer obtained from ieee80211_alloc_hw().
* @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
* @control: will be filled with information needed to send this beacon.
*
* If the beacon frames are generated by the host system (i.e., not in
* hardware/firmware), the low-level driver uses this function to receive
Expand Down Expand Up @@ -1574,6 +1575,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
* ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
* @control: will be filled with information needed to send returned frame.
*
* Function for accessing buffered broadcast and multicast frames. If
* hardware/firmware does not implement buffering of broadcast/multicast
Expand Down Expand Up @@ -1621,8 +1623,9 @@ unsigned int ieee80211_hdrlen(__le16 fc);
*
* @keyconf: the parameter passed with the set key
* @skb: the skb for which the key is needed
* @rc4key: a buffer to which the key will be written
* @type: TBD
* @key: a buffer to which the key will be written
* @key: TBD
*/
void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
struct sk_buff *skb,
Expand Down Expand Up @@ -1723,8 +1726,7 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @ra: receiver address of the BA session recipient
* @tid: the TID to BA on.
*
* Return: success if addBA request was sent, failure otherwise
* @return: success if addBA request was sent, failure otherwise
*
* Although mac80211/low level driver/user space application can estimate
* the need to start aggregation on a certain RA/TID, the session level
Expand Down Expand Up @@ -1762,8 +1764,7 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
* @ra: receiver address of the BA session recipient
* @tid: the TID to stop BA.
* @initiator: if indicates initiator DELBA frame will be sent.
*
* Return: error if no sta with matching da found, success otherwise
* @return: error if no sta with matching da found, success otherwise
*
* Although mac80211/low level driver/user space application can estimate
* the need to stop aggregation on a certain RA/TID, the session level
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/mac80211/rc80211_minstrel_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ minstrel_stats_open(struct inode *inode, struct file *file)
prob / 10, prob % 10,
mr->last_success,
mr->last_attempts,
(unsigned long long)mr->succ_hist,
(unsigned long long)mr->att_hist);
mr->succ_hist,
mr->att_hist);
}
p += sprintf(p, "\nTotal packet count:: ideal %d "
"lookaround %d\n\n",
Expand All @@ -106,7 +106,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
return 0;
}

static ssize_t
static int
minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o)
{
struct minstrel_stats_info *ms;
Expand Down
Loading

0 comments on commit 339afd7

Please sign in to comment.