Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306787
b: refs/heads/master
c: 64b05e2
h: refs/heads/master
i:
  306785: 3da3b05
  306783: dcd7b92
v: v3
  • Loading branch information
Avinash Patil authored and John W. Linville committed May 16, 2012
1 parent 2ecac9c commit 35d33fa
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 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: dfcfb545d7edd0542c187c948237006675c4a656
refs/heads/master: 64b05e2f46598a504c1af05844e98d03df552ce5
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/mwifiex/decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/ieee80211.h>


#define MWIFIEX_MAX_BSS_NUM (1)
#define MWIFIEX_MAX_BSS_NUM (2)

#define MWIFIEX_MIN_DATA_HEADER_LEN 36 /* sizeof(mwifiex_txpd)
* + 4 byte alignment
Expand Down
33 changes: 18 additions & 15 deletions trunk/drivers/net/wireless/mwifiex/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops,

adapter->priv_num = 0;

/* Allocate memory for private structure */
adapter->priv[0] = kzalloc(sizeof(struct mwifiex_private), GFP_KERNEL);
if (!adapter->priv[0]) {
dev_err(adapter->dev,
"%s: failed to alloc priv[0]\n", __func__);
goto error;
}

adapter->priv_num++;
for (i = 0; i < MWIFIEX_MAX_BSS_NUM; i++) {
/* Allocate memory for private structure */
adapter->priv[i] =
kzalloc(sizeof(struct mwifiex_private), GFP_KERNEL);
if (!adapter->priv[i])
goto error;

adapter->priv[0]->adapter = adapter;
adapter->priv[i]->adapter = adapter;
adapter->priv[i]->bss_priority = i;
adapter->priv_num++;
}
mwifiex_init_lock_list(adapter);

init_timer(&adapter->cmd_timer);
Expand Down Expand Up @@ -836,13 +836,16 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
}

priv = adapter->priv[0];
if (!priv)
if (!priv || !priv->wdev)
goto exit_remove;

if (priv->wdev) {
wiphy_unregister(priv->wdev->wiphy);
wiphy_free(priv->wdev->wiphy);
kfree(priv->wdev);
wiphy_unregister(priv->wdev->wiphy);
wiphy_free(priv->wdev->wiphy);

for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
if (priv)
kfree(priv->wdev);
}

mwifiex_terminate_workqueue(adapter);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/mwifiex/wmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,10 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
tid_ptr = &(priv_tmp)->wmm.
tid_tbl_ptr[tos_to_tid[i]];

/* For non-STA ra_list_curr may be NULL */
if (!tid_ptr->ra_list_curr)
continue;

spin_lock_irqsave(&tid_ptr->tid_tbl_lock,
flags);
is_list_empty =
Expand Down

0 comments on commit 35d33fa

Please sign in to comment.