qcacld-3.0: Fix kernel checkpatch warnings in wlan_hdd_oemdata.h
Fix kernel checkpatch warnings in wlan_hdd_oemdata.h. Change-Id: Ic280113327e24a8934b0895c12b39ed7b4f73df6 CRs-Fixed: 2024274
This commit is contained in:
parent
ea32d6a61b
commit
caac83feac
@ -61,31 +61,31 @@
|
||||
* @OEM_ERR_INVALID_MESSAGE_TYPE: Invalid message type
|
||||
* @OEM_ERR_INVALID_MESSAGE_LENGTH: Invalid length in message body
|
||||
*/
|
||||
typedef enum {
|
||||
enum oem_err_code {
|
||||
OEM_ERR_NULL_CONTEXT = 1,
|
||||
OEM_ERR_APP_NOT_REGISTERED,
|
||||
OEM_ERR_INVALID_SIGNATURE,
|
||||
OEM_ERR_NULL_MESSAGE_HEADER,
|
||||
OEM_ERR_INVALID_MESSAGE_TYPE,
|
||||
OEM_ERR_INVALID_MESSAGE_LENGTH
|
||||
} eOemErrorCode;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef tDriverVersion - Driver version identifier (w.x.y.z)
|
||||
* struct driver_version - Driver version identifier (w.x.y.z)
|
||||
* @major: Version ID major number
|
||||
* @minor: Version ID minor number
|
||||
* @patch: Version ID patch number
|
||||
* @build: Version ID build number
|
||||
*/
|
||||
typedef struct qdf_packed {
|
||||
struct driver_version {
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
uint8_t patch;
|
||||
uint8_t build;
|
||||
} tDriverVersion;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef t_iw_oem_data_cap - OEM Data Capabilities
|
||||
* struct oem_data_cap - OEM Data Capabilities
|
||||
* @oem_target_signature: Signature of chipset vendor, e.g. QUALCOMM
|
||||
* @oem_target_type: Chip type
|
||||
* @oem_fw_version: Firmware version
|
||||
@ -98,11 +98,11 @@ typedef struct qdf_packed {
|
||||
* @num_channels: Num of channels IDs to follow
|
||||
* @channel_list: List of channel IDs
|
||||
*/
|
||||
typedef struct qdf_packed {
|
||||
struct oem_data_cap {
|
||||
uint8_t oem_target_signature[OEM_TARGET_SIGNATURE_LEN];
|
||||
uint32_t oem_target_type;
|
||||
uint32_t oem_fw_version;
|
||||
tDriverVersion driver_version;
|
||||
struct driver_version driver_version;
|
||||
uint16_t allowed_dwell_time_min;
|
||||
uint16_t allowed_dwell_time_max;
|
||||
uint16_t curr_dwell_time_min;
|
||||
@ -110,10 +110,10 @@ typedef struct qdf_packed {
|
||||
uint16_t supported_bands;
|
||||
uint16_t num_channels;
|
||||
uint8_t channel_list[OEM_CAP_MAX_NUM_CHANNELS];
|
||||
} t_iw_oem_data_cap;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef tHddChannelInfo - Channel information
|
||||
* struct hdd_channel_info - Channel information
|
||||
* @chan_id: channel id
|
||||
* @reserved0: reserved for padding and future use
|
||||
* @mhz: primary 20 MHz channel frequency in mhz
|
||||
@ -125,7 +125,7 @@ typedef struct qdf_packed {
|
||||
* max power, reg power and reg class id
|
||||
* @reg_info_2: regulatory information field 2 which contains antennamax
|
||||
*/
|
||||
typedef struct qdf_packed {
|
||||
struct hdd_channel_info {
|
||||
uint32_t chan_id;
|
||||
uint32_t reserved0;
|
||||
uint32_t mhz;
|
||||
@ -134,10 +134,10 @@ typedef struct qdf_packed {
|
||||
uint32_t info;
|
||||
uint32_t reg_info_1;
|
||||
uint32_t reg_info_2;
|
||||
} tHddChannelInfo;
|
||||
};
|
||||
|
||||
/**
|
||||
* typedef tPeerStatusInfo - Status information for a given peer
|
||||
* struct peer_status_info - Status information for a given peer
|
||||
* @peer_mac_addr: peer mac address
|
||||
* @peer_status: peer status: 1: CONNECTED, 2: DISCONNECTED
|
||||
* @vdev_id: vdev_id for the peer mac
|
||||
@ -145,14 +145,14 @@ typedef struct qdf_packed {
|
||||
* @reserved0: reserved0
|
||||
* @peer_chan_info: channel info on which peer is connected
|
||||
*/
|
||||
typedef struct qdf_packed {
|
||||
struct peer_status_info {
|
||||
uint8_t peer_mac_addr[ETH_ALEN];
|
||||
uint8_t peer_status;
|
||||
uint8_t vdev_id;
|
||||
uint32_t peer_capability;
|
||||
uint32_t reserved0;
|
||||
tHddChannelInfo peer_chan_info;
|
||||
} tPeerStatusInfo;
|
||||
struct hdd_channel_info peer_chan_info;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum oem_capability_mask - mask field for userspace client capabilities
|
||||
@ -170,7 +170,7 @@ enum oem_capability_mask {
|
||||
* @client_capabilities: capabilities set by userspace via set request
|
||||
*/
|
||||
struct oem_get_capability_rsp {
|
||||
t_iw_oem_data_cap target_cap;
|
||||
struct oem_data_cap target_cap;
|
||||
struct sme_oem_capability cap;
|
||||
};
|
||||
|
||||
|
@ -61,7 +61,7 @@ static struct hdd_context_s *p_hdd_ctx;
|
||||
* Return: error code
|
||||
*/
|
||||
static int populate_oem_data_cap(hdd_adapter_t *adapter,
|
||||
t_iw_oem_data_cap *data_cap)
|
||||
struct oem_data_cap *data_cap)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct hdd_config *config;
|
||||
@ -141,8 +141,8 @@ int iw_get_oem_data_cap(struct net_device *dev,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
int status;
|
||||
t_iw_oem_data_cap oemDataCap = { {0} };
|
||||
t_iw_oem_data_cap *pHddOemDataCap;
|
||||
struct oem_data_cap oemDataCap = { {0} };
|
||||
struct oem_data_cap *pHddOemDataCap;
|
||||
hdd_adapter_t *pAdapter = (netdev_priv(dev));
|
||||
hdd_context_t *pHddContext;
|
||||
int ret;
|
||||
@ -160,7 +160,7 @@ int iw_get_oem_data_cap(struct net_device *dev,
|
||||
return status;
|
||||
}
|
||||
|
||||
pHddOemDataCap = (t_iw_oem_data_cap *) (extra);
|
||||
pHddOemDataCap = (struct oem_data_cap *) (extra);
|
||||
*pHddOemDataCap = oemDataCap;
|
||||
|
||||
EXIT();
|
||||
@ -467,8 +467,8 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
|
||||
struct sk_buff *skb;
|
||||
struct nlmsghdr *nlh;
|
||||
tAniMsgHdr *aniHdr;
|
||||
tHddChannelInfo *pHddChanInfo;
|
||||
tHddChannelInfo hddChanInfo;
|
||||
struct hdd_channel_info *pHddChanInfo;
|
||||
struct hdd_channel_info hddChanInfo;
|
||||
uint8_t chanId;
|
||||
uint32_t reg_info_1;
|
||||
uint32_t reg_info_2;
|
||||
@ -483,7 +483,7 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
|
||||
}
|
||||
|
||||
skb = alloc_skb(NLMSG_SPACE(sizeof(tAniMsgHdr) + sizeof(uint8_t) +
|
||||
numOfChannels * sizeof(tHddChannelInfo)),
|
||||
numOfChannels * sizeof(*pHddChanInfo)),
|
||||
GFP_KERNEL);
|
||||
if (skb == NULL) {
|
||||
hdd_err("alloc_skb failed");
|
||||
@ -499,7 +499,7 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
|
||||
aniHdr->type = ANI_MSG_CHANNEL_INFO_RSP;
|
||||
|
||||
aniHdr->length =
|
||||
sizeof(uint8_t) + numOfChannels * sizeof(tHddChannelInfo);
|
||||
sizeof(uint8_t) + numOfChannels * sizeof(*pHddChanInfo);
|
||||
nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
|
||||
|
||||
/* First byte of message body will have num of channels */
|
||||
@ -511,9 +511,9 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
|
||||
* then fill in 0 in channel info for that particular channel
|
||||
*/
|
||||
for (i = 0; i < numOfChannels; i++) {
|
||||
pHddChanInfo = (tHddChannelInfo *) ((char *)buf +
|
||||
pHddChanInfo = (struct hdd_channel_info *) ((char *)buf +
|
||||
i *
|
||||
sizeof(tHddChannelInfo));
|
||||
sizeof(*pHddChanInfo));
|
||||
|
||||
chanId = chanList[i];
|
||||
status = sme_get_reg_info(p_hdd_ctx->hHal, chanId,
|
||||
@ -552,7 +552,7 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
|
||||
hddChanInfo.reg_info_2 = 0;
|
||||
}
|
||||
qdf_mem_copy(pHddChanInfo, &hddChanInfo,
|
||||
sizeof(tHddChannelInfo));
|
||||
sizeof(*pHddChanInfo));
|
||||
}
|
||||
|
||||
skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length)));
|
||||
@ -638,7 +638,7 @@ static int oem_process_get_cap_req_msg(void)
|
||||
{
|
||||
int error_code;
|
||||
struct oem_get_capability_rsp *cap_rsp;
|
||||
t_iw_oem_data_cap data_cap = { {0} };
|
||||
struct oem_data_cap data_cap = { {0} };
|
||||
struct sme_oem_capability oem_cap;
|
||||
hdd_adapter_t *adapter;
|
||||
struct sk_buff *skb;
|
||||
@ -713,7 +713,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
|
||||
struct sk_buff *skb;
|
||||
struct nlmsghdr *nlh;
|
||||
tAniMsgHdr *aniHdr;
|
||||
tPeerStatusInfo *pPeerInfo;
|
||||
struct peer_status_info *pPeerInfo;
|
||||
|
||||
if (!p_hdd_ctx || !p_hdd_ctx->hHal) {
|
||||
hdd_err("Either HDD Ctx is null or Hal Ctx is null");
|
||||
@ -729,7 +729,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
|
||||
}
|
||||
|
||||
skb = alloc_skb(NLMSG_SPACE(sizeof(tAniMsgHdr) +
|
||||
sizeof(tPeerStatusInfo)),
|
||||
sizeof(*pPeerInfo)),
|
||||
GFP_KERNEL);
|
||||
if (skb == NULL) {
|
||||
hdd_err("alloc_skb failed");
|
||||
@ -744,10 +744,10 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
|
||||
aniHdr = NLMSG_DATA(nlh);
|
||||
aniHdr->type = ANI_MSG_PEER_STATUS_IND;
|
||||
|
||||
aniHdr->length = sizeof(tPeerStatusInfo);
|
||||
aniHdr->length = sizeof(*pPeerInfo);
|
||||
nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
|
||||
|
||||
pPeerInfo = (tPeerStatusInfo *) ((char *)aniHdr + sizeof(tAniMsgHdr));
|
||||
pPeerInfo = (struct peer_status_info *) ((char *)aniHdr + sizeof(tAniMsgHdr));
|
||||
|
||||
qdf_mem_copy(pPeerInfo->peer_mac_addr, peerMac->bytes,
|
||||
sizeof(peerMac->bytes));
|
||||
|
Loading…
Reference in New Issue
Block a user