Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183301
b: refs/heads/master
c: cd74468
h: refs/heads/master
i:
  183299: 63c55d7
v: v3
  • Loading branch information
Holger Schurig authored and John W. Linville committed Dec 22, 2009
1 parent e4814f1 commit 8ffc2ab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 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: 55e1ff924414111a6afbfde00375a1302aef9353
refs/heads/master: cd74468b8c56c1a809d9b7f913f11d8181c3a0b2
19 changes: 17 additions & 2 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,17 @@ void lbs_remove_card(struct lbs_private *priv)
EXPORT_SYMBOL_GPL(lbs_remove_card);


static int lbs_rtap_supported(struct lbs_private *priv)
{
if (MRVL_FW_MAJOR_REV(priv->fwrelease) == MRVL_FW_V5)
return 1;

/* newer firmware use a capability mask */
return ((MRVL_FW_MAJOR_REV(priv->fwrelease) >= MRVL_FW_V10) &&
(priv->fwcapinfo & MESH_CAPINFO_ENABLE_MASK));
}


int lbs_start_card(struct lbs_private *priv)
{
struct net_device *dev = priv->dev;
Expand All @@ -1081,12 +1092,14 @@ int lbs_start_card(struct lbs_private *priv)

lbs_update_channel(priv);

lbs_init_mesh(priv);

/*
* While rtap isn't related to mesh, only mesh-enabled
* firmware implements the rtap functionality via
* CMD_802_11_MONITOR_MODE.
*/
if (lbs_init_mesh(priv)) {
if (lbs_rtap_supported(priv)) {
if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
lbs_pr_err("cannot register lbs_rtap attribute\n");
}
Expand Down Expand Up @@ -1120,7 +1133,9 @@ void lbs_stop_card(struct lbs_private *priv)
netif_carrier_off(dev);

lbs_debugfs_remove_one(priv);
if (lbs_deinit_mesh(priv))
lbs_deinit_mesh(priv);

if (lbs_rtap_supported(priv))
device_remove_file(&dev->dev, &dev_attr_lbs_rtap);

/* Delete the timeout of the currently processing command */
Expand Down

0 comments on commit 8ffc2ab

Please sign in to comment.