int rttm_init(void* ar) { S_RTTM_CONTEXT *prttm=NULL; ath6kl_dbg(ATH6KL_DBG_RTT,"rttm init "); prttm=kmalloc(sizeof(S_RTTM_CONTEXT),GFP_KERNEL); if(NULL==prttm) return -ENOMEM; memset(prttm,0,sizeof(S_RTTM_CONTEXT)); if(NULL==prttm->cirbuf) { ath6kl_err("RTT Init Failed to AllocMem for rttm context \n"); return -ENOMEM; } prttm->pvreadptr = prttm->cirbuf; prttm->pvbufptr = prttm->cirbuf; prttm->ar =ar; DEV_SETRTT_HDL(prttm); //Initialize NL For RTT if(0!=ath_netlink_init()) { ath6kl_err("RTT Init Failed to Initialize NetLink Interface \n"); return -ENODEV; } return 0; }
int rttm_init(void *ar) { struct rttm_context *prttm = NULL; ath6kl_dbg(ATH6KL_DBG_RTT, "rttm init "); prttm = kmalloc(sizeof(struct rttm_context), GFP_KERNEL); if (NULL == prttm) return -ENOMEM; memset(prttm, 0, sizeof(struct rttm_context)); prttm->ar = ar; DEV_SETRTT_HDL(prttm); /* Initialize NL For RTT */ if (0 != ath_netlink_init()) { ath6kl_err("RTT Init Failed to Initialize NetLink Interface\n"); return -ENODEV; } return 0; }