Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203286
b: refs/heads/master
c: 41b4b28
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Smolorz authored and John W. Linville committed Jun 24, 2010
1 parent b216b05 commit 09da978
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 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: c937019761a758f2749b1f3a032b7a91fb044753
refs/heads/master: 41b4b289adaaf53e563a2cde17c45c492608edb0
72 changes: 36 additions & 36 deletions trunk/drivers/net/wireless/at76c50x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,42 @@ static struct fwentry *at76_load_firmware(struct usb_device *udev,
return NULL;
}

static int at76_join(struct at76_priv *priv)
{
struct at76_req_join join;
int ret;

memset(&join, 0, sizeof(struct at76_req_join));
memcpy(join.essid, priv->essid, priv->essid_size);
join.essid_size = priv->essid_size;
memcpy(join.bssid, priv->bssid, ETH_ALEN);
join.bss_type = INFRASTRUCTURE_MODE;
join.channel = priv->channel;
join.timeout = cpu_to_le16(2000);

at76_dbg(DBG_MAC80211, "%s: sending CMD_JOIN", __func__);
ret = at76_set_card_command(priv->udev, CMD_JOIN, &join,
sizeof(struct at76_req_join));

if (ret < 0) {
printk(KERN_ERR "%s: at76_set_card_command failed: %d\n",
wiphy_name(priv->hw->wiphy), ret);
return 0;
}

ret = at76_wait_completion(priv, CMD_JOIN);
at76_dbg(DBG_MAC80211, "%s: CMD_JOIN returned: 0x%02x", __func__, ret);
if (ret != CMD_STATUS_COMPLETE) {
printk(KERN_ERR "%s: at76_wait_completion failed: %d\n",
wiphy_name(priv->hw->wiphy), ret);
return 0;
}

at76_set_pm_mode(priv);

return 0;
}

static void at76_mac80211_tx_callback(struct urb *urb)
{
struct at76_priv *priv = urb->context;
Expand Down Expand Up @@ -1818,42 +1854,6 @@ static void at76_remove_interface(struct ieee80211_hw *hw,
at76_dbg(DBG_MAC80211, "%s()", __func__);
}

static int at76_join(struct at76_priv *priv)
{
struct at76_req_join join;
int ret;

memset(&join, 0, sizeof(struct at76_req_join));
memcpy(join.essid, priv->essid, priv->essid_size);
join.essid_size = priv->essid_size;
memcpy(join.bssid, priv->bssid, ETH_ALEN);
join.bss_type = INFRASTRUCTURE_MODE;
join.channel = priv->channel;
join.timeout = cpu_to_le16(2000);

at76_dbg(DBG_MAC80211, "%s: sending CMD_JOIN", __func__);
ret = at76_set_card_command(priv->udev, CMD_JOIN, &join,
sizeof(struct at76_req_join));

if (ret < 0) {
printk(KERN_ERR "%s: at76_set_card_command failed: %d\n",
wiphy_name(priv->hw->wiphy), ret);
return 0;
}

ret = at76_wait_completion(priv, CMD_JOIN);
at76_dbg(DBG_MAC80211, "%s: CMD_JOIN returned: 0x%02x", __func__, ret);
if (ret != CMD_STATUS_COMPLETE) {
printk(KERN_ERR "%s: at76_wait_completion failed: %d\n",
wiphy_name(priv->hw->wiphy), ret);
return 0;
}

at76_set_pm_mode(priv);

return 0;
}

static void at76_dwork_hw_scan(struct work_struct *work)
{
struct at76_priv *priv = container_of(work, struct at76_priv,
Expand Down

0 comments on commit 09da978

Please sign in to comment.