aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_ap.c
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-02 06:33:40 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-12-05 19:31:32 -0500
commitb0471bb7b779f5deea109e5bfdfe8c18d4a06241 (patch)
treed2fffb2916469c84b20a3e8e747cbf77d1a00e70 /drivers/net/wireless/hostap/hostap_ap.c
parent9cdac9657fda58ae39c2bbc8be396f5530ed8398 (diff)
[PATCH] hostap: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_ap.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index ba13125024c..798a8555fbd 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -1099,15 +1099,13 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr)
1099{ 1099{
1100 struct sta_info *sta; 1100 struct sta_info *sta;
1101 1101
1102 sta = (struct sta_info *) 1102 sta = kzalloc(sizeof(struct sta_info), GFP_ATOMIC);
1103 kmalloc(sizeof(struct sta_info), GFP_ATOMIC);
1104 if (sta == NULL) { 1103 if (sta == NULL) {
1105 PDEBUG(DEBUG_AP, "AP: kmalloc failed\n"); 1104 PDEBUG(DEBUG_AP, "AP: kmalloc failed\n");
1106 return NULL; 1105 return NULL;
1107 } 1106 }
1108 1107
1109 /* initialize STA info data */ 1108 /* initialize STA info data */
1110 memset(sta, 0, sizeof(struct sta_info));
1111 sta->local = ap->local; 1109 sta->local = ap->local;
1112 skb_queue_head_init(&sta->tx_buf); 1110 skb_queue_head_init(&sta->tx_buf);
1113 memcpy(sta->addr, addr, ETH_ALEN); 1111 memcpy(sta->addr, addr, ETH_ALEN);