Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134236
b: refs/heads/master
c: 66aafd9
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Jan 29, 2009
1 parent ad1ebec commit 6bfb449
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 1fac36ee7d5a0611e1216b02b485b154c8aa6dad
refs/heads/master: 66aafd9a3108da465a73bd755366416e75fb9d3d
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/rtl818x/rtl8187_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,19 +974,21 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
{
struct rtl8187_priv *priv = dev->priv;
int i;
int ret = -EOPNOTSUPP;

mutex_lock(&priv->conf_mutex);
if (priv->mode != NL80211_IFTYPE_MONITOR)
return -EOPNOTSUPP;
goto exit;

switch (conf->type) {
case NL80211_IFTYPE_STATION:
priv->mode = conf->type;
break;
default:
return -EOPNOTSUPP;
goto exit;
}

mutex_lock(&priv->conf_mutex);
ret = 0;
priv->vif = conf->vif;

rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
Expand All @@ -995,8 +997,9 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
((u8 *)conf->mac_addr)[i]);
rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);

exit:
mutex_unlock(&priv->conf_mutex);
return 0;
return ret;
}

static void rtl8187_remove_interface(struct ieee80211_hw *dev,
Expand Down

0 comments on commit 6bfb449

Please sign in to comment.