summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/11n.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2014-07-11 20:57:14 -0700
committerJohn W. Linville <linville@tuxdriver.com>2014-07-15 16:00:07 -0400
commitea4eb7fb0c6c5bb56fcbf2181f2d43cdfa95265a (patch)
treee460aa22dd9e257d7bc30a9801a379c314ad08de /drivers/net/wireless/mwifiex/11n.c
parent30fa51c8889bfad475a6c7ec46a203092da5c162 (diff)
downloadblackbird-op-linux-ea4eb7fb0c6c5bb56fcbf2181f2d43cdfa95265a.tar.gz
blackbird-op-linux-ea4eb7fb0c6c5bb56fcbf2181f2d43cdfa95265a.zip
mwifiex: declare sta_ptr in smaller scope
sta_ptr is used only in an 'if' branch in this function. Move it to the smaller scope where it is used. Reported-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/11n.c')
-rw-r--r--drivers/net/wireless/mwifiex/11n.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index 9d6d8d9f01e3..62f5dbe602d3 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -541,7 +541,6 @@ void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid,
int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac)
{
struct host_cmd_ds_11n_addba_req add_ba_req;
- struct mwifiex_sta_node *sta_ptr;
u32 tx_win_size = priv->add_ba_param.tx_win_size;
static u8 dialog_tok;
int ret;
@@ -553,6 +552,8 @@ int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac)
ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info) &&
priv->adapter->is_hw_11ac_capable &&
memcmp(priv->cfg_bssid, peer_mac, ETH_ALEN)) {
+ struct mwifiex_sta_node *sta_ptr;
+
sta_ptr = mwifiex_get_sta_entry(priv, peer_mac);
if (!sta_ptr) {
dev_warn(priv->adapter->dev,
OpenPOWER on IntegriCloud