diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-07-01 17:39:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-03 14:29:21 -0400 |
commit | 701a9e619347ac06d59481db14bbc4df99763270 (patch) | |
tree | ed80d875448559c6bd062cafbbbe717066f5a1c9 /drivers/net | |
parent | e055a6e20a9105551295da164c31179b82c6227e (diff) |
mwifiex: initialize Tx/Rx info of a packet correctly
There are few places at the begining of Tx/Rx paths where
tx_info/rx_info is not correctly initialized. This patch
takes care of it.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_aggr.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_tx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/tdls.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_txrx.c | 1 |
7 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c index 5b32106182f8..fe0f66f73507 100644 --- a/drivers/net/wireless/mwifiex/11n_aggr.c +++ b/drivers/net/wireless/mwifiex/11n_aggr.c | |||
@@ -185,6 +185,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, | |||
185 | skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); | 185 | skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); |
186 | tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); | 186 | tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); |
187 | 187 | ||
188 | memset(tx_info_aggr, 0, sizeof(*tx_info_aggr)); | ||
188 | tx_info_aggr->bss_type = tx_info_src->bss_type; | 189 | tx_info_aggr->bss_type = tx_info_src->bss_type; |
189 | tx_info_aggr->bss_num = tx_info_src->bss_num; | 190 | tx_info_aggr->bss_num = tx_info_src->bss_num; |
190 | 191 | ||
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index e95dec91a561..b511613bba2d 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -220,6 +220,7 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
220 | } | 220 | } |
221 | 221 | ||
222 | tx_info = MWIFIEX_SKB_TXCB(skb); | 222 | tx_info = MWIFIEX_SKB_TXCB(skb); |
223 | memset(tx_info, 0, sizeof(*tx_info)); | ||
223 | tx_info->bss_num = priv->bss_num; | 224 | tx_info->bss_num = priv->bss_num; |
224 | tx_info->bss_type = priv->bss_type; | 225 | tx_info->bss_type = priv->bss_type; |
225 | tx_info->pkt_len = pkt_len; | 226 | tx_info->pkt_len = pkt_len; |
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index 8dee6c86f4f1..c161141f6c39 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c | |||
@@ -453,6 +453,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter) | |||
453 | 453 | ||
454 | if (skb) { | 454 | if (skb) { |
455 | rx_info = MWIFIEX_SKB_RXCB(skb); | 455 | rx_info = MWIFIEX_SKB_RXCB(skb); |
456 | memset(rx_info, 0, sizeof(*rx_info)); | ||
456 | rx_info->bss_num = priv->bss_num; | 457 | rx_info->bss_num = priv->bss_num; |
457 | rx_info->bss_type = priv->bss_type; | 458 | rx_info->bss_type = priv->bss_type; |
458 | } | 459 | } |
diff --git a/drivers/net/wireless/mwifiex/sta_tx.c b/drivers/net/wireless/mwifiex/sta_tx.c index 5fce7e78a36e..70eb863c7249 100644 --- a/drivers/net/wireless/mwifiex/sta_tx.c +++ b/drivers/net/wireless/mwifiex/sta_tx.c | |||
@@ -150,6 +150,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags) | |||
150 | return -1; | 150 | return -1; |
151 | 151 | ||
152 | tx_info = MWIFIEX_SKB_TXCB(skb); | 152 | tx_info = MWIFIEX_SKB_TXCB(skb); |
153 | memset(tx_info, 0, sizeof(*tx_info)); | ||
153 | tx_info->bss_num = priv->bss_num; | 154 | tx_info->bss_num = priv->bss_num; |
154 | tx_info->bss_type = priv->bss_type; | 155 | tx_info->bss_type = priv->bss_type; |
155 | tx_info->pkt_len = data_len - (sizeof(struct txpd) + INTF_HEADER_LEN); | 156 | tx_info->pkt_len = data_len - (sizeof(struct txpd) + INTF_HEADER_LEN); |
diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c index e73034fbbde9..0e88364e0c67 100644 --- a/drivers/net/wireless/mwifiex/tdls.c +++ b/drivers/net/wireless/mwifiex/tdls.c | |||
@@ -605,6 +605,7 @@ int mwifiex_send_tdls_data_frame(struct mwifiex_private *priv, const u8 *peer, | |||
605 | } | 605 | } |
606 | 606 | ||
607 | tx_info = MWIFIEX_SKB_TXCB(skb); | 607 | tx_info = MWIFIEX_SKB_TXCB(skb); |
608 | memset(tx_info, 0, sizeof(*tx_info)); | ||
608 | tx_info->bss_num = priv->bss_num; | 609 | tx_info->bss_num = priv->bss_num; |
609 | tx_info->bss_type = priv->bss_type; | 610 | tx_info->bss_type = priv->bss_type; |
610 | 611 | ||
@@ -760,6 +761,7 @@ int mwifiex_send_tdls_action_frame(struct mwifiex_private *priv, const u8 *peer, | |||
760 | skb->priority = MWIFIEX_PRIO_VI; | 761 | skb->priority = MWIFIEX_PRIO_VI; |
761 | 762 | ||
762 | tx_info = MWIFIEX_SKB_TXCB(skb); | 763 | tx_info = MWIFIEX_SKB_TXCB(skb); |
764 | memset(tx_info, 0, sizeof(*tx_info)); | ||
763 | tx_info->bss_num = priv->bss_num; | 765 | tx_info->bss_num = priv->bss_num; |
764 | tx_info->bss_type = priv->bss_type; | 766 | tx_info->bss_type = priv->bss_type; |
765 | tx_info->flags |= MWIFIEX_BUF_FLAG_TDLS_PKT; | 767 | tx_info->flags |= MWIFIEX_BUF_FLAG_TDLS_PKT; |
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index 37f26afd4314..fd7e5b9b4581 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c | |||
@@ -55,6 +55,7 @@ int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter, | |||
55 | return -1; | 55 | return -1; |
56 | } | 56 | } |
57 | 57 | ||
58 | memset(rx_info, 0, sizeof(*rx_info)); | ||
58 | rx_info->bss_num = priv->bss_num; | 59 | rx_info->bss_num = priv->bss_num; |
59 | rx_info->bss_type = priv->bss_type; | 60 | rx_info->bss_type = priv->bss_type; |
60 | 61 | ||
diff --git a/drivers/net/wireless/mwifiex/uap_txrx.c b/drivers/net/wireless/mwifiex/uap_txrx.c index 9a56bc61cb1d..b0601b91cc4f 100644 --- a/drivers/net/wireless/mwifiex/uap_txrx.c +++ b/drivers/net/wireless/mwifiex/uap_txrx.c | |||
@@ -175,6 +175,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv, | |||
175 | } | 175 | } |
176 | 176 | ||
177 | tx_info = MWIFIEX_SKB_TXCB(skb); | 177 | tx_info = MWIFIEX_SKB_TXCB(skb); |
178 | memset(tx_info, 0, sizeof(*tx_info)); | ||
178 | tx_info->bss_num = priv->bss_num; | 179 | tx_info->bss_num = priv->bss_num; |
179 | tx_info->bss_type = priv->bss_type; | 180 | tx_info->bss_type = priv->bss_type; |
180 | tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT; | 181 | tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT; |