Commit 701a9e61 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e055a6e2
...@@ -185,6 +185,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, ...@@ -185,6 +185,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); skb_reserve(skb_aggr, headroom + sizeof(struct txpd));
tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr);
memset(tx_info_aggr, 0, sizeof(*tx_info_aggr));
tx_info_aggr->bss_type = tx_info_src->bss_type; tx_info_aggr->bss_type = tx_info_src->bss_type;
tx_info_aggr->bss_num = tx_info_src->bss_num; tx_info_aggr->bss_num = tx_info_src->bss_num;
......
...@@ -220,6 +220,7 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, ...@@ -220,6 +220,7 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
} }
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
memset(tx_info, 0, sizeof(*tx_info));
tx_info->bss_num = priv->bss_num; tx_info->bss_num = priv->bss_num;
tx_info->bss_type = priv->bss_type; tx_info->bss_type = priv->bss_type;
tx_info->pkt_len = pkt_len; tx_info->pkt_len = pkt_len;
......
...@@ -453,6 +453,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter) ...@@ -453,6 +453,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter)
if (skb) { if (skb) {
rx_info = MWIFIEX_SKB_RXCB(skb); rx_info = MWIFIEX_SKB_RXCB(skb);
memset(rx_info, 0, sizeof(*rx_info));
rx_info->bss_num = priv->bss_num; rx_info->bss_num = priv->bss_num;
rx_info->bss_type = priv->bss_type; rx_info->bss_type = priv->bss_type;
} }
......
...@@ -150,6 +150,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags) ...@@ -150,6 +150,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
return -1; return -1;
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
memset(tx_info, 0, sizeof(*tx_info));
tx_info->bss_num = priv->bss_num; tx_info->bss_num = priv->bss_num;
tx_info->bss_type = priv->bss_type; tx_info->bss_type = priv->bss_type;
tx_info->pkt_len = data_len - (sizeof(struct txpd) + INTF_HEADER_LEN); tx_info->pkt_len = data_len - (sizeof(struct txpd) + INTF_HEADER_LEN);
......
...@@ -605,6 +605,7 @@ int mwifiex_send_tdls_data_frame(struct mwifiex_private *priv, const u8 *peer, ...@@ -605,6 +605,7 @@ int mwifiex_send_tdls_data_frame(struct mwifiex_private *priv, const u8 *peer,
} }
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
memset(tx_info, 0, sizeof(*tx_info));
tx_info->bss_num = priv->bss_num; tx_info->bss_num = priv->bss_num;
tx_info->bss_type = priv->bss_type; tx_info->bss_type = priv->bss_type;
...@@ -760,6 +761,7 @@ int mwifiex_send_tdls_action_frame(struct mwifiex_private *priv, const u8 *peer, ...@@ -760,6 +761,7 @@ int mwifiex_send_tdls_action_frame(struct mwifiex_private *priv, const u8 *peer,
skb->priority = MWIFIEX_PRIO_VI; skb->priority = MWIFIEX_PRIO_VI;
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
memset(tx_info, 0, sizeof(*tx_info));
tx_info->bss_num = priv->bss_num; tx_info->bss_num = priv->bss_num;
tx_info->bss_type = priv->bss_type; tx_info->bss_type = priv->bss_type;
tx_info->flags |= MWIFIEX_BUF_FLAG_TDLS_PKT; tx_info->flags |= MWIFIEX_BUF_FLAG_TDLS_PKT;
......
...@@ -55,6 +55,7 @@ int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter, ...@@ -55,6 +55,7 @@ int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter,
return -1; return -1;
} }
memset(rx_info, 0, sizeof(*rx_info));
rx_info->bss_num = priv->bss_num; rx_info->bss_num = priv->bss_num;
rx_info->bss_type = priv->bss_type; rx_info->bss_type = priv->bss_type;
......
...@@ -175,6 +175,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv, ...@@ -175,6 +175,7 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
} }
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
memset(tx_info, 0, sizeof(*tx_info));
tx_info->bss_num = priv->bss_num; tx_info->bss_num = priv->bss_num;
tx_info->bss_type = priv->bss_type; tx_info->bss_type = priv->bss_type;
tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT; tx_info->flags |= MWIFIEX_BUF_FLAG_BRIDGED_PKT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment