aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/uap_cmd.c
diff options
context:
space:
mode:
authorMaithili Hinge <maithili@marvell.com>2014-04-14 18:32:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-22 15:06:29 -0400
commit16cf6b804d37e8a0c6e36965d3a2c661b5116141 (patch)
treee8265a1eded3be61f7faf767036f7b96c4f5cc92 /drivers/net/wireless/mwifiex/uap_cmd.c
parent6c9ec5ebf6462d04293644259edb57926af4adea (diff)
mwifiex: change memset to simple assignment for ht_cap.mcs.rx_mask
WARNING: single byte memset is suspicious. Swapped 2nd/3rd argument? This code happens to work because rx_mcs is the first variable in mcs structure. We should use 'mcs.rx_mcs' here anyway. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/uap_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index 9be6544bdded..32643555dd2a 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -175,17 +175,19 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
175 switch (GET_RXSTBC(cap_info)) { 175 switch (GET_RXSTBC(cap_info)) {
176 case MWIFIEX_RX_STBC1: 176 case MWIFIEX_RX_STBC1:
177 /* HT_CAP 1X1 mode */ 177 /* HT_CAP 1X1 mode */
178 memset(&bss_cfg->ht_cap.mcs, 0xff, 1); 178 bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
179 break; 179 break;
180 case MWIFIEX_RX_STBC12: /* fall through */ 180 case MWIFIEX_RX_STBC12: /* fall through */
181 case MWIFIEX_RX_STBC123: 181 case MWIFIEX_RX_STBC123:
182 /* HT_CAP 2X2 mode */ 182 /* HT_CAP 2X2 mode */
183 memset(&bss_cfg->ht_cap.mcs, 0xff, 2); 183 bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
184 bss_cfg->ht_cap.mcs.rx_mask[1] = 0xff;
184 break; 185 break;
185 default: 186 default:
186 dev_warn(priv->adapter->dev, 187 dev_warn(priv->adapter->dev,
187 "Unsupported RX-STBC, default to 2x2\n"); 188 "Unsupported RX-STBC, default to 2x2\n");
188 memset(&bss_cfg->ht_cap.mcs, 0xff, 2); 189 bss_cfg->ht_cap.mcs.rx_mask[0] = 0xff;
190 bss_cfg->ht_cap.mcs.rx_mask[1] = 0xff;
189 break; 191 break;
190 } 192 }
191 priv->ap_11n_enabled = 1; 193 priv->ap_11n_enabled = 1;