Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134433
b: refs/heads/master
c: 141b38b
h: refs/heads/master
i:
  134431: 0dea42c
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Feb 11, 2009
1 parent 1411134 commit bfc5c3b
Show file tree
Hide file tree
Showing 24 changed files with 300 additions and 268 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: f3a7c66b5ce0b75a9774a50b5dcce93e5ba28370
refs/heads/master: 141b38b6bc6db69348a9eaed87137451240bc55f
2 changes: 1 addition & 1 deletion trunk/drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0098"
#define DRV_VERSION "EHEA_0097"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3448,7 +3448,6 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
ehea_destroy_eq(adapter->neq);

out_free_ad:
list_del(&adapter->list);
kfree(adapter);

out:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ static ssize_t tun_chr_aio_write(struct kiocb *iocb, const struct iovec *iv,
unsigned long count, loff_t pos)
{
struct file *file = iocb->ki_filp;
struct tun_struct *tun = tun_get(file);
struct tun_struct *tun = file->private_data;
ssize_t result;

if (!tun)
Expand Down
25 changes: 14 additions & 11 deletions trunk/drivers/net/usb/rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
struct rndis_keepalive_c *msg = (void *)buf;

msg->msg_type = RNDIS_MSG_KEEPALIVE_C;
msg->msg_len = cpu_to_le32(sizeof *msg);
msg->msg_len = ccpu2(sizeof *msg);
msg->status = RNDIS_STATUS_SUCCESS;
retval = usb_control_msg(dev->udev,
usb_sndctrlpipe(dev->udev, 0),
Expand Down Expand Up @@ -237,7 +237,7 @@ static int rndis_query(struct usbnet *dev, struct usb_interface *intf,
u.get->msg_len = cpu_to_le32(sizeof *u.get + in_len);
u.get->oid = oid;
u.get->len = cpu_to_le32(in_len);
u.get->offset = cpu_to_le32(20);
u.get->offset = ccpu2(20);

retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE);
if (unlikely(retval < 0)) {
Expand Down Expand Up @@ -297,9 +297,9 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
goto fail;

u.init->msg_type = RNDIS_MSG_INIT;
u.init->msg_len = cpu_to_le32(sizeof *u.init);
u.init->major_version = cpu_to_le32(1);
u.init->minor_version = cpu_to_le32(0);
u.init->msg_len = ccpu2(sizeof *u.init);
u.init->major_version = ccpu2(1);
u.init->minor_version = ccpu2(0);

/* max transfer (in spec) is 0x4000 at full speed, but for
* TX we'll stick to one Ethernet packet plus RNDIS framing.
Expand Down Expand Up @@ -403,10 +403,10 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
/* set a nonzero filter to enable data transfers */
memset(u.set, 0, sizeof *u.set);
u.set->msg_type = RNDIS_MSG_SET;
u.set->msg_len = cpu_to_le32(4 + sizeof *u.set);
u.set->msg_len = ccpu2(4 + sizeof *u.set);
u.set->oid = OID_GEN_CURRENT_PACKET_FILTER;
u.set->len = cpu_to_le32(4);
u.set->offset = cpu_to_le32((sizeof *u.set) - 8);
u.set->len = ccpu2(4);
u.set->offset = ccpu2((sizeof *u.set) - 8);
*(__le32 *)(u.buf + sizeof *u.set) = RNDIS_DEFAULT_FILTER;

retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE);
Expand All @@ -423,7 +423,7 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
halt_fail_and_release:
memset(u.halt, 0, sizeof *u.halt);
u.halt->msg_type = RNDIS_MSG_HALT;
u.halt->msg_len = cpu_to_le32(sizeof *u.halt);
u.halt->msg_len = ccpu2(sizeof *u.halt);
(void) rndis_command(dev, (void *)u.halt, CONTROL_BUFFER_SIZE);
fail_and_release:
usb_set_intfdata(info->data, NULL);
Expand All @@ -448,7 +448,7 @@ void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL);
if (halt) {
halt->msg_type = RNDIS_MSG_HALT;
halt->msg_len = cpu_to_le32(sizeof *halt);
halt->msg_len = ccpu2(sizeof *halt);
(void) rndis_command(dev, (void *)halt, CONTROL_BUFFER_SIZE);
kfree(halt);
}
Expand Down Expand Up @@ -543,7 +543,7 @@ rndis_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
memset(hdr, 0, sizeof *hdr);
hdr->msg_type = RNDIS_MSG_PACKET;
hdr->msg_len = cpu_to_le32(skb->len);
hdr->data_offset = cpu_to_le32(sizeof(*hdr) - 8);
hdr->data_offset = ccpu2(sizeof(*hdr) - 8);
hdr->data_len = cpu_to_le32(len);

/* FIXME make the last packet always be short ... */
Expand All @@ -562,6 +562,9 @@ static const struct driver_info rndis_info = {
.tx_fixup = rndis_tx_fixup,
};

#undef ccpu2


/*-------------------------------------------------------------------------*/

static const struct usb_device_id products [] = {
Expand Down
60 changes: 46 additions & 14 deletions trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
DPRINTF(sc, ATH_DBG_CONFIG, "Starting driver with "
"initial channel: %d MHz\n", curchan->center_freq);

mutex_lock(&sc->mutex);

/* setup initial channel */

pos = curchan->hw_value;
Expand All @@ -1963,7 +1965,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
"(freq %u MHz)\n", r,
curchan->center_freq);
spin_unlock_bh(&sc->sc_resetlock);
return r;
goto mutex_unlock;
}
spin_unlock_bh(&sc->sc_resetlock);

Expand All @@ -1983,7 +1985,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
if (ath_startrecv(sc) != 0) {
DPRINTF(sc, ATH_DBG_FATAL,
"Unable to start recv logic\n");
return -EIO;
r = -EIO;
goto mutex_unlock;
}

/* Setup our intr mask. */
Expand All @@ -2010,6 +2013,10 @@ static int ath9k_start(struct ieee80211_hw *hw)
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
r = ath_start_rfkill_poll(sc);
#endif

mutex_unlock:
mutex_unlock(&sc->mutex);

return r;
}

Expand Down Expand Up @@ -2074,7 +2081,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
return;
}

DPRINTF(sc, ATH_DBG_CONFIG, "Cleaning up\n");
mutex_lock(&sc->mutex);

ieee80211_stop_queues(sc->hw);

Expand All @@ -2099,6 +2106,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)

sc->sc_flags |= SC_OP_INVALID;

mutex_unlock(&sc->mutex);

DPRINTF(sc, ATH_DBG_CONFIG, "Driver halt\n");
}

Expand All @@ -2114,6 +2123,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
if (sc->sc_nvaps)
return -ENOBUFS;

mutex_lock(&sc->mutex);

switch (conf->type) {
case NL80211_IFTYPE_STATION:
ic_opmode = NL80211_IFTYPE_STATION;
Expand Down Expand Up @@ -2173,6 +2184,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
}

mutex_unlock(&sc->mutex);

return 0;
}

Expand All @@ -2184,6 +2197,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,

DPRINTF(sc, ATH_DBG_CONFIG, "Detach Interface\n");

mutex_lock(&sc->mutex);

/* Stop ANI */
del_timer_sync(&sc->sc_ani.timer);

Expand All @@ -2198,6 +2213,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,

sc->sc_vaps[0] = NULL;
sc->sc_nvaps--;

mutex_unlock(&sc->mutex);
}

static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
Expand All @@ -2206,6 +2223,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ieee80211_conf *conf = &hw->conf;

mutex_lock(&sc->mutex);

if (changed & IEEE80211_CONF_CHANGE_PS) {
if (conf->flags & IEEE80211_CONF_PS) {
if ((sc->sc_imask & ATH9K_INT_TIM_TIMER) == 0) {
Expand Down Expand Up @@ -2250,6 +2268,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
sc->sc_config.txpowlimit = 2 * conf->power_level;

mutex_unlock(&sc->mutex);

return 0;
}

Expand Down Expand Up @@ -2392,8 +2411,7 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw,
}
}

static int ath9k_conf_tx(struct ieee80211_hw *hw,
u16 queue,
static int ath9k_conf_tx(struct ieee80211_hw *hw, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct ath_softc *sc = hw->priv;
Expand All @@ -2403,6 +2421,8 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw,
if (queue >= WME_NUM_AC)
return 0;

mutex_lock(&sc->mutex);

qi.tqi_aifs = params->aifs;
qi.tqi_cwmin = params->cw_min;
qi.tqi_cwmax = params->cw_max;
Expand All @@ -2419,6 +2439,8 @@ static int ath9k_conf_tx(struct ieee80211_hw *hw,
if (ret)
DPRINTF(sc, ATH_DBG_FATAL, "TXQ Update failed\n");

mutex_unlock(&sc->mutex);

return ret;
}

Expand All @@ -2431,6 +2453,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
struct ath_softc *sc = hw->priv;
int ret = 0;

mutex_lock(&sc->mutex);
ath9k_ps_wakeup(sc);
DPRINTF(sc, ATH_DBG_KEYCACHE, "Set HW Key\n");

Expand All @@ -2456,6 +2479,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
}

ath9k_ps_restore(sc);
mutex_unlock(&sc->mutex);

return ret;
}

Expand All @@ -2466,6 +2491,8 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
{
struct ath_softc *sc = hw->priv;

mutex_lock(&sc->mutex);

if (changed & BSS_CHANGED_ERP_PREAMBLE) {
DPRINTF(sc, ATH_DBG_CONFIG, "BSS Changed PREAMBLE %d\n",
bss_conf->use_short_preamble);
Expand All @@ -2490,39 +2517,44 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
bss_conf->assoc);
ath9k_bss_assoc_info(sc, vif, bss_conf);
}

mutex_unlock(&sc->mutex);
}

static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
{
u64 tsf;
struct ath_softc *sc = hw->priv;
struct ath_hal *ah = sc->sc_ah;

tsf = ath9k_hw_gettsf64(ah);
mutex_lock(&sc->mutex);
tsf = ath9k_hw_gettsf64(sc->sc_ah);
mutex_unlock(&sc->mutex);

return tsf;
}

static void ath9k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
{
struct ath_softc *sc = hw->priv;
struct ath_hal *ah = sc->sc_ah;

ath9k_hw_settsf64(ah, tsf);
mutex_lock(&sc->mutex);
ath9k_hw_settsf64(sc->sc_ah, tsf);
mutex_unlock(&sc->mutex);
}

static void ath9k_reset_tsf(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
struct ath_hal *ah = sc->sc_ah;

ath9k_hw_reset_tsf(ah);
mutex_lock(&sc->mutex);
ath9k_hw_reset_tsf(sc->sc_ah);
mutex_unlock(&sc->mutex);
}

static int ath9k_ampdu_action(struct ieee80211_hw *hw,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta,
u16 tid, u16 *ssn)
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta,
u16 tid, u16 *ssn)
{
struct ath_softc *sc = hw->priv;
int ret = 0;
Expand Down
Loading

0 comments on commit bfc5c3b

Please sign in to comment.