diff options
| author | Ajit Vaishya <ajitv@codeaurora.org> | 2017-04-18 18:51:20 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-05-04 01:52:12 -0700 |
| commit | 11812fdab74916389cde09b69a7e2db30c8a0d6f (patch) | |
| tree | 994c022443966fbfd12182a0837072e566295360 | |
| parent | 9cf8cb58196902b490c2e9bca6f5a7d55e5b4bf2 (diff) | |
qcacld-3.0: Fix kernel check patch warnings in PTT
Fix msm-4.4 kernel check patch warnings for PTT module.
Change-Id: I3bb7170c971f66178efe5cda837337a2e362f822
CRs-Fixed: 2041367
| -rw-r--r-- | core/utils/ptt/inc/wlan_ptt_sock_svc.h | 18 | ||||
| -rw-r--r-- | core/utils/ptt/src/wlan_ptt_sock_svc.c | 14 |
2 files changed, 18 insertions, 14 deletions
diff --git a/core/utils/ptt/inc/wlan_ptt_sock_svc.h b/core/utils/ptt/inc/wlan_ptt_sock_svc.h index c75f7e0cb9d4..d031691574d8 100644 --- a/core/utils/ptt/inc/wlan_ptt_sock_svc.h +++ b/core/utils/ptt/inc/wlan_ptt_sock_svc.h @@ -115,10 +115,10 @@ static inline int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, * WLAN Driver, in either direction. Each msg will begin with this header and * will followed by the Quarky message */ -typedef struct sAniAppRegReq { +struct sAniAppRegReq { tAniNlModTypes type; /* module id */ int pid; /* process id */ -} tAniNlAppRegReq; +}; /** * struct sptt_app_reg_req - PTT register request structure @@ -127,14 +127,14 @@ typedef struct sAniAppRegReq { * * payload structure received as nl data from PTT app/user space */ -typedef struct sptt_app_reg_req { +struct sptt_app_reg_req { int radio; tAniHdr wmsg; -} ptt_app_reg_req; +}; -typedef struct sAniNlAppRegRsp { - tAniHdr wniHdr; /* Generic WNI msg header */ - tAniNlAppRegReq regReq; /* The original request msg */ - int ret; /* Return code */ -} tAniNlAppRegRsp; +struct sAniNlAppRegRsp { + tAniHdr wniHdr; /* Generic WNI msg header */ + struct sAniAppRegReq regReq; /* The original request msg */ + int ret; /* Return code */ +}; #endif diff --git a/core/utils/ptt/src/wlan_ptt_sock_svc.c b/core/utils/ptt/src/wlan_ptt_sock_svc.c index 39a7afaf4342..aa0187425985 100644 --- a/core/utils/ptt/src/wlan_ptt_sock_svc.c +++ b/core/utils/ptt/src/wlan_ptt_sock_svc.c @@ -59,6 +59,7 @@ static int32_t ptt_pid = INVALID_PID; static void ptt_sock_dump_buf(const unsigned char *pbuf, int cnt) { int i; + for (i = 0; i < cnt; i++) { if ((i % 16) == 0) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, @@ -183,9 +184,10 @@ int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, int src_mod, int pid) */ static void ptt_sock_proc_reg_req(tAniHdr *wmsg, int radio) { - tAniNlAppRegReq *reg_req; - tAniNlAppRegRsp rspmsg; - reg_req = (tAniNlAppRegReq *) (wmsg + 1); + struct sAniAppRegReq *reg_req; + struct sAniNlAppRegRsp rspmsg; + + reg_req = (struct sAniAppRegReq *) (wmsg + 1); memset((char *)&rspmsg, 0, sizeof(rspmsg)); /* send reg response message to the application */ rspmsg.ret = ANI_NL_MSG_OK; @@ -209,6 +211,7 @@ static void ptt_sock_proc_reg_req(tAniHdr *wmsg, int radio) static void ptt_proc_pumac_msg(struct sk_buff *skb, tAniHdr *wmsg, int radio) { u16 ani_msg_type = be16_to_cpu(wmsg->type); + switch (ani_msg_type) { case ANI_MSG_APP_REG_REQ: PTT_TRACE(QDF_TRACE_LEVEL_INFO, @@ -232,6 +235,7 @@ static int ptt_sock_rx_nlink_msg(struct sk_buff *skb) tAniNlHdr *wnl; int radio; int type; + wnl = (tAniNlHdr *) skb->data; radio = wnl->radio; type = wnl->nlh.nlmsg_type; @@ -265,7 +269,7 @@ static int ptt_sock_rx_nlink_msg(struct sk_buff *skb) */ static void ptt_cmd_handler(const void *data, int data_len, void *ctx, int pid) { - ptt_app_reg_req *payload; + struct sptt_app_reg_req *payload; struct nlattr *tb[CLD80211_ATTR_MAX + 1]; if (nla_parse(tb, CLD80211_ATTR_MAX, data, data_len, NULL)) { @@ -278,7 +282,7 @@ static void ptt_cmd_handler(const void *data, int data_len, void *ctx, int pid) return; } - payload = (ptt_app_reg_req *)(nla_data(tb[CLD80211_ATTR_DATA])); + payload = (struct sptt_app_reg_req *)(nla_data(tb[CLD80211_ATTR_DATA])); switch (payload->wmsg.type) { case ANI_MSG_APP_REG_REQ: ptt_sock_send_msg_to_app(&payload->wmsg, payload->radio, |
