Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] siano: get rid of CammelCase from smscoreapi.h

It is almost impossible to see a compliant with checkpatch.pl
on those Siano drivers, as there are simply too much violations
on it. So, now that a big change was done, the better is to
cleanup the checkpatch compliants.

Let's first replace all CammelCase symbols found at smscoreapi.h
using camel_case namespace. That removed 144 checkpatch.pl
compliants on this file. Of course, the other files need to be
fixed accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

+682 -682
+6 -6
drivers/media/common/siano/sms-cards.c
··· 167 167 } 168 168 EXPORT_SYMBOL_GPL(sms_get_board); 169 169 static inline void sms_gpio_assign_11xx_default_led_config( 170 - struct smscore_config_gpio *pGpioConfig) { 171 - pGpioConfig->direction = SMS_GPIO_DIRECTION_OUTPUT; 172 - pGpioConfig->inputcharacteristics = 170 + struct smscore_config_gpio *p_gpio_config) { 171 + p_gpio_config->direction = SMS_GPIO_DIRECTION_OUTPUT; 172 + p_gpio_config->inputcharacteristics = 173 173 SMS_GPIO_INPUTCHARACTERISTICS_NORMAL; 174 - pGpioConfig->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA; 175 - pGpioConfig->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS; 176 - pGpioConfig->pullupdown = SMS_GPIO_PULLUPDOWN_NONE; 174 + p_gpio_config->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA; 175 + p_gpio_config->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS; 176 + p_gpio_config->pullupdown = SMS_GPIO_PULLUPDOWN_NONE; 177 177 } 178 178 179 179 int sms_board_event(struct smscore_device_t *coredev,
+168 -168
drivers/media/common/siano/smscoreapi.c
··· 792 792 if (rc != 0) 793 793 sms_err("Error initialization DTV IR sub-module"); 794 794 else { 795 - buffer = kmalloc(sizeof(struct SmsMsgData_ST2) + 795 + buffer = kmalloc(sizeof(struct sms_msg_data2) + 796 796 SMS_DMA_ALIGNMENT, 797 797 GFP_KERNEL | GFP_DMA); 798 798 if (buffer) { 799 - struct SmsMsgData_ST2 *msg = 800 - (struct SmsMsgData_ST2 *) 799 + struct sms_msg_data2 *msg = 800 + (struct sms_msg_data2 *) 801 801 SMS_ALIGN_ADDRESS(buffer); 802 802 803 - SMS_INIT_MSG(&msg->xMsgHeader, 803 + SMS_INIT_MSG(&msg->x_msg_header, 804 804 MSG_SMS_START_IR_REQ, 805 - sizeof(struct SmsMsgData_ST2)); 805 + sizeof(struct sms_msg_data2)); 806 806 msg->msgData[0] = coredev->ir.controller; 807 807 msg->msgData[1] = coredev->ir.timeout; 808 808 809 809 rc = smscore_sendrequest_and_wait(coredev, msg, 810 - msg->xMsgHeader. msgLength, 810 + msg->x_msg_header. msg_length, 811 811 &coredev->ir_init_done); 812 812 813 813 kfree(buffer); ··· 840 840 } 841 841 842 842 if (board->mtu) { 843 - struct SmsMsgData_ST MtuMsg; 843 + struct sms_msg_data MtuMsg; 844 844 sms_debug("set max transmit unit %d", board->mtu); 845 845 846 - MtuMsg.xMsgHeader.msgSrcId = 0; 847 - MtuMsg.xMsgHeader.msgDstId = HIF_TASK; 848 - MtuMsg.xMsgHeader.msgFlags = 0; 849 - MtuMsg.xMsgHeader.msgType = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ; 850 - MtuMsg.xMsgHeader.msgLength = sizeof(MtuMsg); 846 + MtuMsg.x_msg_header.msg_src_id = 0; 847 + MtuMsg.x_msg_header.msg_dst_id = HIF_TASK; 848 + MtuMsg.x_msg_header.msg_flags = 0; 849 + MtuMsg.x_msg_header.msg_type = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ; 850 + MtuMsg.x_msg_header.msg_length = sizeof(MtuMsg); 851 851 MtuMsg.msgData[0] = board->mtu; 852 852 853 853 coredev->sendrequest_handler(coredev->context, &MtuMsg, ··· 855 855 } 856 856 857 857 if (board->crystal) { 858 - struct SmsMsgData_ST CrysMsg; 858 + struct sms_msg_data CrysMsg; 859 859 sms_debug("set crystal value %d", board->crystal); 860 860 861 - SMS_INIT_MSG(&CrysMsg.xMsgHeader, 861 + SMS_INIT_MSG(&CrysMsg.x_msg_header, 862 862 MSG_SMS_NEW_CRYSTAL_REQ, 863 863 sizeof(CrysMsg)); 864 864 CrysMsg.msgData[0] = board->crystal; ··· 916 916 static int smscore_load_firmware_family2(struct smscore_device_t *coredev, 917 917 void *buffer, size_t size) 918 918 { 919 - struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; 920 - struct SmsMsgData_ST4 *msg; 919 + struct sms_firmware *firmware = (struct sms_firmware *) buffer; 920 + struct sms_msg_data4 *msg; 921 921 u32 mem_address, calc_checksum = 0; 922 922 u32 i, *ptr; 923 - u8 *payload = firmware->Payload; 923 + u8 *payload = firmware->payload; 924 924 int rc = 0; 925 - firmware->StartAddress = le32_to_cpu(firmware->StartAddress); 926 - firmware->Length = le32_to_cpu(firmware->Length); 925 + firmware->start_address = le32_to_cpu(firmware->start_address); 926 + firmware->length = le32_to_cpu(firmware->length); 927 927 928 - mem_address = firmware->StartAddress; 928 + mem_address = firmware->start_address; 929 929 930 930 sms_info("loading FW to addr 0x%x size %d", 931 - mem_address, firmware->Length); 931 + mem_address, firmware->length); 932 932 if (coredev->preload_handler) { 933 933 rc = coredev->preload_handler(coredev->context); 934 934 if (rc < 0) ··· 942 942 943 943 if (coredev->mode != DEVICE_MODE_NONE) { 944 944 sms_debug("sending reload command."); 945 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_START_REQ, 946 - sizeof(struct SmsMsgHdr_ST)); 945 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_START_REQ, 946 + sizeof(struct sms_msg_hdr)); 947 947 rc = smscore_sendrequest_and_wait(coredev, msg, 948 - msg->xMsgHeader.msgLength, 948 + msg->x_msg_header.msg_length, 949 949 &coredev->reload_start_done); 950 950 if (rc < 0) { 951 951 sms_err("device reload failed, rc %d", rc); ··· 954 954 mem_address = *(u32 *) &payload[20]; 955 955 } 956 956 957 - for (i = 0, ptr = (u32 *)firmware->Payload; i < firmware->Length/4 ; 957 + for (i = 0, ptr = (u32 *)firmware->payload; i < firmware->length/4 ; 958 958 i++, ptr++) 959 959 calc_checksum += *ptr; 960 960 961 961 while (size && rc >= 0) { 962 - struct SmsDataDownload_ST *DataMsg = 963 - (struct SmsDataDownload_ST *) msg; 962 + struct sms_data_download *DataMsg = 963 + (struct sms_data_download *) msg; 964 964 int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); 965 965 966 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_DOWNLOAD_REQ, 967 - (u16)(sizeof(struct SmsMsgHdr_ST) + 966 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ, 967 + (u16)(sizeof(struct sms_msg_hdr) + 968 968 sizeof(u32) + payload_size)); 969 969 970 - DataMsg->MemAddr = mem_address; 971 - memcpy(DataMsg->Payload, payload, payload_size); 970 + DataMsg->mem_addr = mem_address; 971 + memcpy(DataMsg->payload, payload, payload_size); 972 972 973 973 rc = smscore_sendrequest_and_wait(coredev, DataMsg, 974 - DataMsg->xMsgHeader.msgLength, 974 + DataMsg->x_msg_header.msg_length, 975 975 &coredev->data_download_done); 976 976 977 977 payload += payload_size; ··· 984 984 985 985 sms_err("sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x", 986 986 calc_checksum); 987 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_VALIDITY_REQ, 988 - sizeof(msg->xMsgHeader) + 987 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_VALIDITY_REQ, 988 + sizeof(msg->x_msg_header) + 989 989 sizeof(u32) * 3); 990 - msg->msgData[0] = firmware->StartAddress; 990 + msg->msgData[0] = firmware->start_address; 991 991 /* Entry point */ 992 - msg->msgData[1] = firmware->Length; 992 + msg->msgData[1] = firmware->length; 993 993 msg->msgData[2] = 0; /* Regular checksum*/ 994 994 rc = smscore_sendrequest_and_wait(coredev, msg, 995 - msg->xMsgHeader.msgLength, 995 + msg->x_msg_header.msg_length, 996 996 &coredev->data_validity_done); 997 997 if (rc < 0) 998 998 goto exit_fw_download; 999 999 1000 1000 if (coredev->mode == DEVICE_MODE_NONE) { 1001 - struct SmsMsgData_ST *TriggerMsg = 1002 - (struct SmsMsgData_ST *) msg; 1001 + struct sms_msg_data *TriggerMsg = 1002 + (struct sms_msg_data *) msg; 1003 1003 1004 1004 sms_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ"); 1005 - SMS_INIT_MSG(&msg->xMsgHeader, 1005 + SMS_INIT_MSG(&msg->x_msg_header, 1006 1006 MSG_SMS_SWDOWNLOAD_TRIGGER_REQ, 1007 - sizeof(struct SmsMsgHdr_ST) + 1007 + sizeof(struct sms_msg_hdr) + 1008 1008 sizeof(u32) * 5); 1009 1009 1010 - TriggerMsg->msgData[0] = firmware->StartAddress; 1010 + TriggerMsg->msgData[0] = firmware->start_address; 1011 1011 /* Entry point */ 1012 1012 TriggerMsg->msgData[1] = 6; /* Priority */ 1013 1013 TriggerMsg->msgData[2] = 0x200; /* Stack size */ ··· 1015 1015 TriggerMsg->msgData[4] = 4; /* Task ID */ 1016 1016 1017 1017 rc = smscore_sendrequest_and_wait(coredev, TriggerMsg, 1018 - TriggerMsg->xMsgHeader.msgLength, 1018 + TriggerMsg->x_msg_header.msg_length, 1019 1019 &coredev->trigger_done); 1020 1020 } else { 1021 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_EXEC_REQ, 1022 - sizeof(struct SmsMsgHdr_ST)); 1021 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ, 1022 + sizeof(struct sms_msg_hdr)); 1023 1023 rc = coredev->sendrequest_handler(coredev->context, msg, 1024 - msg->xMsgHeader.msgLength); 1024 + msg->x_msg_header.msg_length); 1025 1025 } 1026 1026 1027 1027 if (rc < 0) ··· 1256 1256 1257 1257 static int smscore_detect_mode(struct smscore_device_t *coredev) 1258 1258 { 1259 - void *buffer = kmalloc(sizeof(struct SmsMsgHdr_ST) + SMS_DMA_ALIGNMENT, 1259 + void *buffer = kmalloc(sizeof(struct sms_msg_hdr) + SMS_DMA_ALIGNMENT, 1260 1260 GFP_KERNEL | GFP_DMA); 1261 - struct SmsMsgHdr_ST *msg = 1262 - (struct SmsMsgHdr_ST *) SMS_ALIGN_ADDRESS(buffer); 1261 + struct sms_msg_hdr *msg = 1262 + (struct sms_msg_hdr *) SMS_ALIGN_ADDRESS(buffer); 1263 1263 int rc; 1264 1264 1265 1265 if (!buffer) 1266 1266 return -ENOMEM; 1267 1267 1268 1268 SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ, 1269 - sizeof(struct SmsMsgHdr_ST)); 1269 + sizeof(struct sms_msg_hdr)); 1270 1270 1271 - rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, 1271 + rc = smscore_sendrequest_and_wait(coredev, msg, msg->msg_length, 1272 1272 &coredev->version_ex_done); 1273 1273 if (rc == -ETIME) { 1274 1274 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed first try"); ··· 1276 1276 if (wait_for_completion_timeout(&coredev->resume_done, 1277 1277 msecs_to_jiffies(5000))) { 1278 1278 rc = smscore_sendrequest_and_wait( 1279 - coredev, msg, msg->msgLength, 1279 + coredev, msg, msg->msg_length, 1280 1280 &coredev->version_ex_done); 1281 1281 if (rc < 0) 1282 1282 sms_err("MSG_SMS_GET_VERSION_EX_REQ failed " ··· 1302 1302 int smscore_init_device(struct smscore_device_t *coredev, int mode) 1303 1303 { 1304 1304 void *buffer; 1305 - struct SmsMsgData_ST *msg; 1305 + struct sms_msg_data *msg; 1306 1306 int rc = 0; 1307 1307 1308 - buffer = kmalloc(sizeof(struct SmsMsgData_ST) + 1308 + buffer = kmalloc(sizeof(struct sms_msg_data) + 1309 1309 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); 1310 1310 if (!buffer) { 1311 1311 sms_err("Could not allocate buffer for init device message."); 1312 1312 return -ENOMEM; 1313 1313 } 1314 1314 1315 - msg = (struct SmsMsgData_ST *)SMS_ALIGN_ADDRESS(buffer); 1316 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ, 1317 - sizeof(struct SmsMsgData_ST)); 1315 + msg = (struct sms_msg_data *)SMS_ALIGN_ADDRESS(buffer); 1316 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ, 1317 + sizeof(struct sms_msg_data)); 1318 1318 msg->msgData[0] = mode; 1319 1319 1320 1320 rc = smscore_sendrequest_and_wait(coredev, msg, 1321 - msg->xMsgHeader. msgLength, 1321 + msg->x_msg_header. msg_length, 1322 1322 &coredev->init_device_done); 1323 1323 1324 1324 kfree(buffer); ··· 1396 1396 coredev->mode = mode; 1397 1397 coredev->device_flags &= ~SMS_DEVICE_NOT_READY; 1398 1398 1399 - buffer = kmalloc(sizeof(struct SmsMsgData_ST) + 1399 + buffer = kmalloc(sizeof(struct sms_msg_data) + 1400 1400 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); 1401 1401 if (buffer) { 1402 - struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *) SMS_ALIGN_ADDRESS(buffer); 1402 + struct sms_msg_data *msg = (struct sms_msg_data *) SMS_ALIGN_ADDRESS(buffer); 1403 1403 1404 - SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ, 1405 - sizeof(struct SmsMsgData_ST)); 1404 + SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ, 1405 + sizeof(struct sms_msg_data)); 1406 1406 msg->msgData[0] = mode; 1407 1407 1408 1408 rc = smscore_sendrequest_and_wait( 1409 - coredev, msg, msg->xMsgHeader.msgLength, 1409 + coredev, msg, msg->x_msg_header.msg_length, 1410 1410 &coredev->init_device_done); 1411 1411 1412 1412 kfree(buffer); ··· 1483 1483 */ 1484 1484 void smscore_onresponse(struct smscore_device_t *coredev, 1485 1485 struct smscore_buffer_t *cb) { 1486 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p 1486 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) ((u8 *) cb->p 1487 1487 + cb->offset); 1488 1488 struct smscore_client_t *client; 1489 1489 int rc = -EBUSY; ··· 1505 1505 1506 1506 data_total += cb->size; 1507 1507 /* Do we need to re-route? */ 1508 - if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) || 1509 - (phdr->msgType == MSG_SMS_TRANSMISSION_IND)) { 1508 + if ((phdr->msg_type == MSG_SMS_HO_PER_SLICES_IND) || 1509 + (phdr->msg_type == MSG_SMS_TRANSMISSION_IND)) { 1510 1510 if (coredev->mode == DEVICE_MODE_DVBT_BDA) 1511 - phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID; 1511 + phdr->msg_dst_id = DVBT_BDA_CONTROL_MSG_ID; 1512 1512 } 1513 1513 1514 1514 1515 - client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); 1515 + client = smscore_find_client(coredev, phdr->msg_type, phdr->msg_dst_id); 1516 1516 1517 1517 /* If no client registered for type & id, 1518 1518 * check for control client where type is not registered */ ··· 1520 1520 rc = client->onresponse_handler(client->context, cb); 1521 1521 1522 1522 if (rc < 0) { 1523 - switch (phdr->msgType) { 1523 + switch (phdr->msg_type) { 1524 1524 case MSG_SMS_ISDBT_TUNE_RES: 1525 1525 break; 1526 1526 case MSG_SMS_RF_TUNE_RES: ··· 1537 1537 break; 1538 1538 case MSG_SMS_GET_VERSION_EX_RES: 1539 1539 { 1540 - struct SmsVersionRes_ST *ver = 1541 - (struct SmsVersionRes_ST *) phdr; 1540 + struct sms_version_res *ver = 1541 + (struct sms_version_res *) phdr; 1542 1542 sms_debug("Firmware id %d prots 0x%x ver %d.%d", 1543 - ver->FirmwareId, ver->SupportedProtocols, 1544 - ver->RomVersionMajor, ver->RomVersionMinor); 1543 + ver->firmware_id, ver->supported_protocols, 1544 + ver->rom_ver_major, ver->rom_ver_minor); 1545 1545 1546 - coredev->mode = ver->FirmwareId == 255 ? 1547 - DEVICE_MODE_NONE : ver->FirmwareId; 1548 - coredev->modes_supported = ver->SupportedProtocols; 1549 - coredev->fw_version = ver->RomVersionMajor << 8 | 1550 - ver->RomVersionMinor; 1546 + coredev->mode = ver->firmware_id == 255 ? 1547 + DEVICE_MODE_NONE : ver->firmware_id; 1548 + coredev->modes_supported = ver->supported_protocols; 1549 + coredev->fw_version = ver->rom_ver_major << 8 | 1550 + ver->rom_ver_minor; 1551 1551 1552 1552 complete(&coredev->version_ex_done); 1553 1553 break; ··· 1560 1560 break; 1561 1561 case MSG_SMS_DATA_VALIDITY_RES: 1562 1562 { 1563 - struct SmsMsgData_ST *validity = (struct SmsMsgData_ST *) phdr; 1563 + struct sms_msg_data *validity = (struct sms_msg_data *) phdr; 1564 1564 1565 1565 sms_err("MSG_SMS_DATA_VALIDITY_RES, checksum = 0x%x", 1566 1566 validity->msgData[0]); ··· 1600 1600 sms_ir_event(coredev, 1601 1601 (const char *) 1602 1602 ((char *)phdr 1603 - + sizeof(struct SmsMsgHdr_ST)), 1604 - (int)phdr->msgLength 1605 - - sizeof(struct SmsMsgHdr_ST)); 1603 + + sizeof(struct sms_msg_hdr)), 1604 + (int)phdr->msg_length 1605 + - sizeof(struct sms_msg_hdr)); 1606 1606 break; 1607 1607 1608 1608 case MSG_SMS_DVBT_BDA_DATA: ··· 1616 1616 1617 1617 default: 1618 1618 sms_debug("message %s(%d) not handled.", 1619 - smscore_translate_msg(phdr->msgType), 1620 - phdr->msgType); 1619 + smscore_translate_msg(phdr->msg_type), 1620 + phdr->msg_type); 1621 1621 break; 1622 1622 } 1623 1623 smscore_putbuffer(coredev, cb); ··· 1799 1799 void *buffer, size_t size) 1800 1800 { 1801 1801 struct smscore_device_t *coredev; 1802 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer; 1802 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer; 1803 1803 int rc; 1804 1804 1805 1805 if (client == NULL) { ··· 1816 1816 } 1817 1817 1818 1818 rc = smscore_validate_client(client->coredev, client, 0, 1819 - phdr->msgSrcId); 1819 + phdr->msg_src_id); 1820 1820 if (rc < 0) 1821 1821 return rc; 1822 1822 ··· 1830 1830 struct smscore_config_gpio *pinconfig) 1831 1831 { 1832 1832 struct { 1833 - struct SmsMsgHdr_ST hdr; 1833 + struct sms_msg_hdr hdr; 1834 1834 u32 data[6]; 1835 1835 } msg; 1836 1836 1837 1837 if (coredev->device_flags & SMS_DEVICE_FAMILY2) { 1838 - msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1839 - msg.hdr.msgDstId = HIF_TASK; 1840 - msg.hdr.msgFlags = 0; 1841 - msg.hdr.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; 1842 - msg.hdr.msgLength = sizeof(msg); 1838 + msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 1839 + msg.hdr.msg_dst_id = HIF_TASK; 1840 + msg.hdr.msg_flags = 0; 1841 + msg.hdr.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ; 1842 + msg.hdr.msg_length = sizeof(msg); 1843 1843 1844 1844 msg.data[0] = pin; 1845 1845 msg.data[1] = pinconfig->pullupdown; ··· 1875 1875 int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level) 1876 1876 { 1877 1877 struct { 1878 - struct SmsMsgHdr_ST hdr; 1878 + struct sms_msg_hdr hdr; 1879 1879 u32 data[3]; 1880 1880 } msg; 1881 1881 1882 1882 if (pin > MAX_GPIO_PIN_NUMBER) 1883 1883 return -EINVAL; 1884 1884 1885 - msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1886 - msg.hdr.msgDstId = HIF_TASK; 1887 - msg.hdr.msgFlags = 0; 1888 - msg.hdr.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ; 1889 - msg.hdr.msgLength = sizeof(msg); 1885 + msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 1886 + msg.hdr.msg_dst_id = HIF_TASK; 1887 + msg.hdr.msg_flags = 0; 1888 + msg.hdr.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ; 1889 + msg.hdr.msg_length = sizeof(msg); 1890 1890 1891 1891 msg.data[0] = pin; 1892 1892 msg.data[1] = level ? 1 : 0; ··· 1897 1897 } 1898 1898 1899 1899 /* new GPIO management implementation */ 1900 - static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum, 1900 + static int GetGpioPinParams(u32 pin_num, u32 *pTranslatedpin_num, 1901 1901 u32 *pGroupNum, u32 *pGroupCfg) { 1902 1902 1903 1903 *pGroupCfg = 1; 1904 1904 1905 - if (PinNum <= 1) { 1906 - *pTranslatedPinNum = 0; 1905 + if (pin_num <= 1) { 1906 + *pTranslatedpin_num = 0; 1907 1907 *pGroupNum = 9; 1908 1908 *pGroupCfg = 2; 1909 - } else if (PinNum >= 2 && PinNum <= 6) { 1910 - *pTranslatedPinNum = 2; 1909 + } else if (pin_num >= 2 && pin_num <= 6) { 1910 + *pTranslatedpin_num = 2; 1911 1911 *pGroupNum = 0; 1912 1912 *pGroupCfg = 2; 1913 - } else if (PinNum >= 7 && PinNum <= 11) { 1914 - *pTranslatedPinNum = 7; 1913 + } else if (pin_num >= 7 && pin_num <= 11) { 1914 + *pTranslatedpin_num = 7; 1915 1915 *pGroupNum = 1; 1916 - } else if (PinNum >= 12 && PinNum <= 15) { 1917 - *pTranslatedPinNum = 12; 1916 + } else if (pin_num >= 12 && pin_num <= 15) { 1917 + *pTranslatedpin_num = 12; 1918 1918 *pGroupNum = 2; 1919 1919 *pGroupCfg = 3; 1920 - } else if (PinNum == 16) { 1921 - *pTranslatedPinNum = 16; 1920 + } else if (pin_num == 16) { 1921 + *pTranslatedpin_num = 16; 1922 1922 *pGroupNum = 23; 1923 - } else if (PinNum >= 17 && PinNum <= 24) { 1924 - *pTranslatedPinNum = 17; 1923 + } else if (pin_num >= 17 && pin_num <= 24) { 1924 + *pTranslatedpin_num = 17; 1925 1925 *pGroupNum = 3; 1926 - } else if (PinNum == 25) { 1927 - *pTranslatedPinNum = 25; 1926 + } else if (pin_num == 25) { 1927 + *pTranslatedpin_num = 25; 1928 1928 *pGroupNum = 6; 1929 - } else if (PinNum >= 26 && PinNum <= 28) { 1930 - *pTranslatedPinNum = 26; 1929 + } else if (pin_num >= 26 && pin_num <= 28) { 1930 + *pTranslatedpin_num = 26; 1931 1931 *pGroupNum = 4; 1932 - } else if (PinNum == 29) { 1933 - *pTranslatedPinNum = 29; 1932 + } else if (pin_num == 29) { 1933 + *pTranslatedpin_num = 29; 1934 1934 *pGroupNum = 5; 1935 1935 *pGroupCfg = 2; 1936 - } else if (PinNum == 30) { 1937 - *pTranslatedPinNum = 30; 1936 + } else if (pin_num == 30) { 1937 + *pTranslatedpin_num = 30; 1938 1938 *pGroupNum = 8; 1939 - } else if (PinNum == 31) { 1940 - *pTranslatedPinNum = 31; 1939 + } else if (pin_num == 31) { 1940 + *pTranslatedpin_num = 31; 1941 1941 *pGroupNum = 17; 1942 1942 } else 1943 1943 return -1; ··· 1947 1947 return 0; 1948 1948 } 1949 1949 1950 - int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, 1951 - struct smscore_config_gpio *pGpioConfig) { 1950 + int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num, 1951 + struct smscore_config_gpio *p_gpio_config) { 1952 1952 1953 1953 u32 totalLen; 1954 - u32 TranslatedPinNum = 0; 1954 + u32 Translatedpin_num = 0; 1955 1955 u32 GroupNum = 0; 1956 1956 u32 ElectricChar; 1957 1957 u32 groupCfg; ··· 1959 1959 int rc; 1960 1960 1961 1961 struct SetGpioMsg { 1962 - struct SmsMsgHdr_ST xMsgHeader; 1962 + struct sms_msg_hdr x_msg_header; 1963 1963 u32 msgData[6]; 1964 1964 } *pMsg; 1965 1965 1966 1966 1967 - if (PinNum > MAX_GPIO_PIN_NUMBER) 1967 + if (pin_num > MAX_GPIO_PIN_NUMBER) 1968 1968 return -EINVAL; 1969 1969 1970 - if (pGpioConfig == NULL) 1970 + if (p_gpio_config == NULL) 1971 1971 return -EINVAL; 1972 1972 1973 - totalLen = sizeof(struct SmsMsgHdr_ST) + (sizeof(u32) * 6); 1973 + totalLen = sizeof(struct sms_msg_hdr) + (sizeof(u32) * 6); 1974 1974 1975 1975 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, 1976 1976 GFP_KERNEL | GFP_DMA); ··· 1979 1979 1980 1980 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 1981 1981 1982 - pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 1983 - pMsg->xMsgHeader.msgDstId = HIF_TASK; 1984 - pMsg->xMsgHeader.msgFlags = 0; 1985 - pMsg->xMsgHeader.msgLength = (u16) totalLen; 1986 - pMsg->msgData[0] = PinNum; 1982 + pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 1983 + pMsg->x_msg_header.msg_dst_id = HIF_TASK; 1984 + pMsg->x_msg_header.msg_flags = 0; 1985 + pMsg->x_msg_header.msg_length = (u16) totalLen; 1986 + pMsg->msgData[0] = pin_num; 1987 1987 1988 1988 if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) { 1989 - pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_REQ; 1990 - if (GetGpioPinParams(PinNum, &TranslatedPinNum, &GroupNum, 1989 + pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_REQ; 1990 + if (GetGpioPinParams(pin_num, &Translatedpin_num, &GroupNum, 1991 1991 &groupCfg) != 0) { 1992 1992 rc = -EINVAL; 1993 1993 goto free; 1994 1994 } 1995 1995 1996 - pMsg->msgData[1] = TranslatedPinNum; 1996 + pMsg->msgData[1] = Translatedpin_num; 1997 1997 pMsg->msgData[2] = GroupNum; 1998 - ElectricChar = (pGpioConfig->pullupdown) 1999 - | (pGpioConfig->inputcharacteristics << 2) 2000 - | (pGpioConfig->outputslewrate << 3) 2001 - | (pGpioConfig->outputdriving << 4); 1998 + ElectricChar = (p_gpio_config->pullupdown) 1999 + | (p_gpio_config->inputcharacteristics << 2) 2000 + | (p_gpio_config->outputslewrate << 3) 2001 + | (p_gpio_config->outputdriving << 4); 2002 2002 pMsg->msgData[3] = ElectricChar; 2003 - pMsg->msgData[4] = pGpioConfig->direction; 2003 + pMsg->msgData[4] = p_gpio_config->direction; 2004 2004 pMsg->msgData[5] = groupCfg; 2005 2005 } else { 2006 - pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; 2007 - pMsg->msgData[1] = pGpioConfig->pullupdown; 2008 - pMsg->msgData[2] = pGpioConfig->outputslewrate; 2009 - pMsg->msgData[3] = pGpioConfig->outputdriving; 2010 - pMsg->msgData[4] = pGpioConfig->direction; 2006 + pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ; 2007 + pMsg->msgData[1] = p_gpio_config->pullupdown; 2008 + pMsg->msgData[2] = p_gpio_config->outputslewrate; 2009 + pMsg->msgData[3] = p_gpio_config->outputdriving; 2010 + pMsg->msgData[4] = p_gpio_config->direction; 2011 2011 pMsg->msgData[5] = 0; 2012 2012 } 2013 2013 ··· 2026 2026 return rc; 2027 2027 } 2028 2028 2029 - int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum, 2030 - u8 NewLevel) { 2029 + int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num, 2030 + u8 new_level) { 2031 2031 2032 2032 u32 totalLen; 2033 2033 int rc; 2034 2034 void *buffer; 2035 2035 2036 2036 struct SetGpioMsg { 2037 - struct SmsMsgHdr_ST xMsgHeader; 2037 + struct sms_msg_hdr x_msg_header; 2038 2038 u32 msgData[3]; /* keep it 3 ! */ 2039 2039 } *pMsg; 2040 2040 2041 - if ((NewLevel > 1) || (PinNum > MAX_GPIO_PIN_NUMBER)) 2041 + if ((new_level > 1) || (pin_num > MAX_GPIO_PIN_NUMBER)) 2042 2042 return -EINVAL; 2043 2043 2044 - totalLen = sizeof(struct SmsMsgHdr_ST) + 2044 + totalLen = sizeof(struct sms_msg_hdr) + 2045 2045 (3 * sizeof(u32)); /* keep it 3 ! */ 2046 2046 2047 2047 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, ··· 2051 2051 2052 2052 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 2053 2053 2054 - pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 2055 - pMsg->xMsgHeader.msgDstId = HIF_TASK; 2056 - pMsg->xMsgHeader.msgFlags = 0; 2057 - pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ; 2058 - pMsg->xMsgHeader.msgLength = (u16) totalLen; 2059 - pMsg->msgData[0] = PinNum; 2060 - pMsg->msgData[1] = NewLevel; 2054 + pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 2055 + pMsg->x_msg_header.msg_dst_id = HIF_TASK; 2056 + pMsg->x_msg_header.msg_flags = 0; 2057 + pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ; 2058 + pMsg->x_msg_header.msg_length = (u16) totalLen; 2059 + pMsg->msgData[0] = pin_num; 2060 + pMsg->msgData[1] = new_level; 2061 2061 2062 2062 /* Send message to SMS */ 2063 2063 rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen, ··· 2074 2074 return rc; 2075 2075 } 2076 2076 2077 - int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum, 2077 + int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num, 2078 2078 u8 *level) { 2079 2079 2080 2080 u32 totalLen; ··· 2082 2082 void *buffer; 2083 2083 2084 2084 struct SetGpioMsg { 2085 - struct SmsMsgHdr_ST xMsgHeader; 2085 + struct sms_msg_hdr x_msg_header; 2086 2086 u32 msgData[2]; 2087 2087 } *pMsg; 2088 2088 2089 2089 2090 - if (PinNum > MAX_GPIO_PIN_NUMBER) 2090 + if (pin_num > MAX_GPIO_PIN_NUMBER) 2091 2091 return -EINVAL; 2092 2092 2093 - totalLen = sizeof(struct SmsMsgHdr_ST) + (2 * sizeof(u32)); 2093 + totalLen = sizeof(struct sms_msg_hdr) + (2 * sizeof(u32)); 2094 2094 2095 2095 buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, 2096 2096 GFP_KERNEL | GFP_DMA); ··· 2099 2099 2100 2100 pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); 2101 2101 2102 - pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 2103 - pMsg->xMsgHeader.msgDstId = HIF_TASK; 2104 - pMsg->xMsgHeader.msgFlags = 0; 2105 - pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_GET_LEVEL_REQ; 2106 - pMsg->xMsgHeader.msgLength = (u16) totalLen; 2107 - pMsg->msgData[0] = PinNum; 2102 + pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 2103 + pMsg->x_msg_header.msg_dst_id = HIF_TASK; 2104 + pMsg->x_msg_header.msg_flags = 0; 2105 + pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_GET_LEVEL_REQ; 2106 + pMsg->x_msg_header.msg_length = (u16) totalLen; 2107 + pMsg->msgData[0] = pin_num; 2108 2108 pMsg->msgData[1] = 0; 2109 2109 2110 2110 /* Send message to SMS */
+208 -208
drivers/media/common/siano/smscoreapi.h
··· 577 577 }; 578 578 579 579 #define SMS_INIT_MSG_EX(ptr, type, src, dst, len) do { \ 580 - (ptr)->msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \ 581 - (ptr)->msgLength = len; (ptr)->msgFlags = 0; \ 580 + (ptr)->msg_type = type; (ptr)->msg_src_id = src; (ptr)->msg_dst_id = dst; \ 581 + (ptr)->msg_length = len; (ptr)->msg_flags = 0; \ 582 582 } while (0) 583 583 584 584 #define SMS_INIT_MSG(ptr, type, len) \ ··· 611 611 DEVICE_MODE_MAX, 612 612 }; 613 613 614 - struct SmsMsgHdr_ST { 615 - u16 msgType; 616 - u8 msgSrcId; 617 - u8 msgDstId; 618 - u16 msgLength; /* Length of entire message, including header */ 619 - u16 msgFlags; 614 + struct sms_msg_hdr { 615 + u16 msg_type; 616 + u8 msg_src_id; 617 + u8 msg_dst_id; 618 + u16 msg_length; /* length of entire message, including header */ 619 + u16 msg_flags; 620 620 }; 621 621 622 - struct SmsMsgData_ST { 623 - struct SmsMsgHdr_ST xMsgHeader; 622 + struct sms_msg_data { 623 + struct sms_msg_hdr x_msg_header; 624 624 u32 msgData[1]; 625 625 }; 626 626 627 - struct SmsMsgData_ST2 { 628 - struct SmsMsgHdr_ST xMsgHeader; 627 + struct sms_msg_data2 { 628 + struct sms_msg_hdr x_msg_header; 629 629 u32 msgData[2]; 630 630 }; 631 631 632 - struct SmsMsgData_ST4 { 633 - struct SmsMsgHdr_ST xMsgHeader; 632 + struct sms_msg_data4 { 633 + struct sms_msg_hdr x_msg_header; 634 634 u32 msgData[4]; 635 635 }; 636 636 637 - struct SmsDataDownload_ST { 638 - struct SmsMsgHdr_ST xMsgHeader; 639 - u32 MemAddr; 640 - u8 Payload[SMS_MAX_PAYLOAD_SIZE]; 637 + struct sms_data_download { 638 + struct sms_msg_hdr x_msg_header; 639 + u32 mem_addr; 640 + u8 payload[SMS_MAX_PAYLOAD_SIZE]; 641 641 }; 642 642 643 - struct SmsVersionRes_ST { 644 - struct SmsMsgHdr_ST xMsgHeader; 643 + struct sms_version_res { 644 + struct sms_msg_hdr x_msg_header; 645 645 646 - u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */ 647 - u8 Step; /* 0 - Step A */ 648 - u8 MetalFix; /* 0 - Metal 0 */ 646 + u16 chip_model; /* e.g. 0x1102 for SMS-1102 "Nova" */ 647 + u8 step; /* 0 - step A */ 648 + u8 metal_fix; /* 0 - Metal 0 */ 649 649 650 - /* FirmwareId 0xFF if ROM, otherwise the 650 + /* firmware_id 0xFF if ROM, otherwise the 651 651 * value indicated by SMSHOSTLIB_DEVICE_MODES_E */ 652 - u8 FirmwareId; 653 - /* SupportedProtocols Bitwise OR combination of 652 + u8 firmware_id; 653 + /* supported_protocols Bitwise OR combination of 654 654 * supported protocols */ 655 - u8 SupportedProtocols; 655 + u8 supported_protocols; 656 656 657 - u8 VersionMajor; 658 - u8 VersionMinor; 659 - u8 VersionPatch; 660 - u8 VersionFieldPatch; 657 + u8 version_major; 658 + u8 version_minor; 659 + u8 version_patch; 660 + u8 version_field_patch; 661 661 662 - u8 RomVersionMajor; 663 - u8 RomVersionMinor; 664 - u8 RomVersionPatch; 665 - u8 RomVersionFieldPatch; 662 + u8 rom_ver_major; 663 + u8 rom_ver_minor; 664 + u8 rom_ver_patch; 665 + u8 rom_ver_field_patch; 666 666 667 667 u8 TextLabel[34]; 668 668 }; 669 669 670 - struct SmsFirmware_ST { 671 - u32 CheckSum; 672 - u32 Length; 673 - u32 StartAddress; 674 - u8 Payload[1]; 670 + struct sms_firmware { 671 + u32 check_sum; 672 + u32 length; 673 + u32 start_address; 674 + u8 payload[1]; 675 675 }; 676 676 677 - /* Statistics information returned as response for 678 - * SmsHostApiGetStatistics_Req */ 677 + /* statistics information returned as response for 678 + * SmsHostApiGetstatistics_Req */ 679 679 struct SMSHOSTLIB_STATISTICS_ST { 680 - u32 Reserved; /* Reserved */ 680 + u32 reserved; /* reserved */ 681 681 682 682 /* Common parameters */ 683 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 684 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 685 - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 683 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 684 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 685 + u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */ 686 686 687 687 /* Reception quality */ 688 688 s32 SNR; /* dB */ ··· 693 693 u32 MFER; /* DVB-H frame error rate in percentage, 694 694 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 695 695 s32 RSSI; /* dBm */ 696 - s32 InBandPwr; /* In band power in dBM */ 697 - s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 696 + s32 in_band_pwr; /* In band power in dBM */ 697 + s32 carrier_offset; /* Carrier Offset in bin/1024 */ 698 698 699 699 /* Transmission parameters */ 700 - u32 Frequency; /* Frequency in Hz */ 701 - u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */ 702 - u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, 700 + u32 frequency; /* frequency in Hz */ 701 + u32 bandwidth; /* bandwidth in MHz, valid only for DVB-T/H */ 702 + u32 transmission_mode; /* Transmission Mode, for DAB modes 1-4, 703 703 for DVB-T/H FFT mode carriers in Kilos */ 704 - u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET, 704 + u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET, 705 705 valid only for DVB-T/H */ 706 - u32 GuardInterval; /* Guard Interval from 706 + u32 guard_interval; /* Guard Interval from 707 707 SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */ 708 - u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 708 + u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 709 709 valid only for DVB-T/H */ 710 - u32 LPCodeRate; /* Low Priority Code Rate from 710 + u32 lp_code_rate; /* Low Priority Code Rate from 711 711 SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */ 712 - u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET, 712 + u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET, 713 713 valid only for DVB-T/H */ 714 - u32 Constellation; /* Constellation from 714 + u32 constellation; /* constellation from 715 715 SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */ 716 716 717 717 /* Burst parameters, valid only for DVB-H */ 718 - u32 BurstSize; /* Current burst size in bytes, 718 + u32 burst_size; /* Current burst size in bytes, 719 719 valid only for DVB-H */ 720 - u32 BurstDuration; /* Current burst duration in mSec, 720 + u32 burst_duration; /* Current burst duration in mSec, 721 721 valid only for DVB-H */ 722 - u32 BurstCycleTime; /* Current burst cycle time in mSec, 722 + u32 burst_cycle_time; /* Current burst cycle time in mSec, 723 723 valid only for DVB-H */ 724 - u32 CalculatedBurstCycleTime;/* Current burst cycle time in mSec, 724 + u32 calc_burst_cycle_time;/* Current burst cycle time in mSec, 725 725 as calculated by demodulator, valid only for DVB-H */ 726 - u32 NumOfRows; /* Number of rows in MPE table, 726 + u32 num_of_rows; /* Number of rows in MPE table, 727 727 valid only for DVB-H */ 728 - u32 NumOfPaddCols; /* Number of padding columns in MPE table, 728 + u32 num_of_padd_cols; /* Number of padding columns in MPE table, 729 729 valid only for DVB-H */ 730 - u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, 730 + u32 num_of_punct_cols; /* Number of puncturing columns in MPE table, 731 731 valid only for DVB-H */ 732 - u32 ErrorTSPackets; /* Number of erroneous 732 + u32 error_ts_packets; /* Number of erroneous 733 733 transport-stream packets */ 734 - u32 TotalTSPackets; /* Total number of transport-stream packets */ 735 - u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include 734 + u32 total_ts_packets; /* Total number of transport-stream packets */ 735 + u32 num_of_valid_mpe_tlbs; /* Number of MPE tables which do not include 736 736 errors after MPE RS decoding */ 737 - u32 NumOfInvalidMpeTlbs;/* Number of MPE tables which include errors 737 + u32 num_of_invalid_mpe_tlbs;/* Number of MPE tables which include errors 738 738 after MPE RS decoding */ 739 - u32 NumOfCorrectedMpeTlbs;/* Number of MPE tables which were 739 + u32 num_of_corrected_mpe_tlbs;/* Number of MPE tables which were 740 740 corrected by MPE RS decoding */ 741 741 /* Common params */ 742 - u32 BERErrorCount; /* Number of errornous SYNC bits. */ 743 - u32 BERBitCount; /* Total number of SYNC bits. */ 742 + u32 ber_error_count; /* Number of errornous SYNC bits. */ 743 + u32 ber_bit_count; /* Total number of SYNC bits. */ 744 744 745 745 /* Interface information */ 746 - u32 SmsToHostTxErrors; /* Total number of transmission errors. */ 746 + u32 sms_to_host_tx_errors; /* Total number of transmission errors. */ 747 747 748 748 /* DAB/T-DMB */ 749 - u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */ 749 + u32 pre_ber; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */ 750 750 751 751 /* DVB-H TPS parameters */ 752 - u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 752 + u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 753 753 if set to 0xFFFFFFFF cell_id not yet recovered */ 754 - u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - 754 + u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 - 755 755 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 756 - u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - 756 + u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 - 757 757 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 758 758 759 - u32 NumMPEReceived; /* DVB-H, Num MPE section received */ 759 + u32 num_mpe_received; /* DVB-H, Num MPE section received */ 760 760 761 - u32 ReservedFields[10]; /* Reserved */ 761 + u32 reservedFields[10]; /* reserved */ 762 762 }; 763 763 764 - struct SmsMsgStatisticsInfo_ST { 765 - u32 RequestResult; 764 + struct sms_msg_statistics_info { 765 + u32 request_result; 766 766 767 - struct SMSHOSTLIB_STATISTICS_ST Stat; 767 + struct SMSHOSTLIB_STATISTICS_ST stat; 768 768 769 769 /* Split the calc of the SNR in DAB */ 770 - u32 Signal; /* dB */ 771 - u32 Noise; /* dB */ 770 + u32 signal; /* dB */ 771 + u32 noise; /* dB */ 772 772 773 773 }; 774 774 775 775 struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST { 776 776 /* Per-layer information */ 777 - u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 777 + u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 778 778 * 255 means layer does not exist */ 779 - u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 779 + u32 constellation; /* constellation from SMSHOSTLIB_CONSTELLATION_ET, 780 780 * 255 means layer does not exist */ 781 781 u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 782 - u32 BERErrorCount; /* Post Viterbi Error Bits Count */ 783 - u32 BERBitCount; /* Post Viterbi Total Bits Count */ 784 - u32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 782 + u32 ber_error_count; /* Post Viterbi Error Bits Count */ 783 + u32 ber_bit_count; /* Post Viterbi Total Bits Count */ 784 + u32 pre_ber; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 785 785 u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */ 786 - u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ 787 - u32 TotalTSPackets; /* Total number of transport-stream packets */ 788 - u32 TILdepthI; /* Time interleaver depth I parameter, 786 + u32 error_ts_packets; /* Number of erroneous transport-stream packets */ 787 + u32 total_ts_packets; /* Total number of transport-stream packets */ 788 + u32 ti_ldepth_i; /* Time interleaver depth I parameter, 789 789 * 255 means layer does not exist */ 790 - u32 NumberOfSegments; /* Number of segments in layer A, 790 + u32 number_of_segments; /* Number of segments in layer A, 791 791 * 255 means layer does not exist */ 792 - u32 TMCCErrors; /* TMCC errors */ 792 + u32 tmcc_errors; /* TMCC errors */ 793 793 }; 794 794 795 795 struct SMSHOSTLIB_STATISTICS_ISDBT_ST { 796 - u32 StatisticsType; /* Enumerator identifying the type of the 796 + u32 statistics_type; /* Enumerator identifying the type of the 797 797 * structure. Values are the same as 798 798 * SMSHOSTLIB_DEVICE_MODES_E 799 799 * 800 800 * This field MUST always be first in any 801 801 * statistics structure */ 802 802 803 - u32 FullSize; /* Total size of the structure returned by the modem. 803 + u32 full_size; /* Total size of the structure returned by the modem. 804 804 * If the size requested by the host is smaller than 805 - * FullSize, the struct will be truncated */ 805 + * full_size, the struct will be truncated */ 806 806 807 807 /* Common parameters */ 808 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 809 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 810 - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 808 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 809 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 810 + u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */ 811 811 812 812 /* Reception quality */ 813 813 s32 SNR; /* dB */ 814 814 s32 RSSI; /* dBm */ 815 - s32 InBandPwr; /* In band power in dBM */ 816 - s32 CarrierOffset; /* Carrier Offset in Hz */ 815 + s32 in_band_pwr; /* In band power in dBM */ 816 + s32 carrier_offset; /* Carrier Offset in Hz */ 817 817 818 818 /* Transmission parameters */ 819 - u32 Frequency; /* Frequency in Hz */ 820 - u32 Bandwidth; /* Bandwidth in MHz */ 821 - u32 TransmissionMode; /* ISDB-T transmission mode */ 822 - u32 ModemState; /* 0 - Acquisition, 1 - Locked */ 823 - u32 GuardInterval; /* Guard Interval, 1 divided by value */ 824 - u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 825 - u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ 826 - u32 NumOfLayers; /* Number of ISDB-T layers in the network */ 819 + u32 frequency; /* frequency in Hz */ 820 + u32 bandwidth; /* bandwidth in MHz */ 821 + u32 transmission_mode; /* ISDB-T transmission mode */ 822 + u32 modem_state; /* 0 - Acquisition, 1 - Locked */ 823 + u32 guard_interval; /* Guard Interval, 1 divided by value */ 824 + u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 825 + u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */ 826 + u32 num_of_layers; /* Number of ISDB-T layers in the network */ 827 827 828 828 /* Per-layer information */ 829 829 /* Layers A, B and C */ ··· 831 831 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ 832 832 833 833 /* Interface information */ 834 - u32 SmsToHostTxErrors; /* Total number of transmission errors. */ 834 + u32 sms_to_host_tx_errors; /* Total number of transmission errors. */ 835 835 }; 836 836 837 837 struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST { 838 - u32 StatisticsType; /* Enumerator identifying the type of the 838 + u32 statistics_type; /* Enumerator identifying the type of the 839 839 * structure. Values are the same as 840 840 * SMSHOSTLIB_DEVICE_MODES_E 841 841 * 842 842 * This field MUST always be first in any 843 843 * statistics structure */ 844 844 845 - u32 FullSize; /* Total size of the structure returned by the modem. 845 + u32 full_size; /* Total size of the structure returned by the modem. 846 846 * If the size requested by the host is smaller than 847 - * FullSize, the struct will be truncated */ 847 + * full_size, the struct will be truncated */ 848 848 849 849 /* Common parameters */ 850 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 851 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 852 - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 850 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 851 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 852 + u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */ 853 853 854 854 /* Reception quality */ 855 855 s32 SNR; /* dB */ 856 856 s32 RSSI; /* dBm */ 857 - s32 InBandPwr; /* In band power in dBM */ 858 - s32 CarrierOffset; /* Carrier Offset in Hz */ 857 + s32 in_band_pwr; /* In band power in dBM */ 858 + s32 carrier_offset; /* Carrier Offset in Hz */ 859 859 860 860 /* Transmission parameters */ 861 - u32 Frequency; /* Frequency in Hz */ 862 - u32 Bandwidth; /* Bandwidth in MHz */ 863 - u32 TransmissionMode; /* ISDB-T transmission mode */ 864 - u32 ModemState; /* 0 - Acquisition, 1 - Locked */ 865 - u32 GuardInterval; /* Guard Interval, 1 divided by value */ 866 - u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 867 - u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ 868 - u32 NumOfLayers; /* Number of ISDB-T layers in the network */ 861 + u32 frequency; /* frequency in Hz */ 862 + u32 bandwidth; /* bandwidth in MHz */ 863 + u32 transmission_mode; /* ISDB-T transmission mode */ 864 + u32 modem_state; /* 0 - Acquisition, 1 - Locked */ 865 + u32 guard_interval; /* Guard Interval, 1 divided by value */ 866 + u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 867 + u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */ 868 + u32 num_of_layers; /* Number of ISDB-T layers in the network */ 869 869 870 - u32 SegmentNumber; /* Segment number for ISDB-Tsb */ 871 - u32 TuneBW; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */ 870 + u32 segment_number; /* Segment number for ISDB-Tsb */ 871 + u32 tune_bw; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */ 872 872 873 873 /* Per-layer information */ 874 874 /* Layers A, B and C */ ··· 876 876 /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ 877 877 878 878 /* Interface information */ 879 - u32 Reserved1; /* Was SmsToHostTxErrors - obsolete . */ 879 + u32 reserved1; /* Was sms_to_host_tx_errors - obsolete . */ 880 880 /* Proprietary information */ 881 - u32 ExtAntenna; /* Obsolete field. */ 882 - u32 ReceptionQuality; 883 - u32 EwsAlertActive; /* Signals if EWS alert is currently on */ 884 - u32 LNAOnOff; /* Internal LNA state: 0: OFF, 1: ON */ 881 + u32 ext_antenna; /* Obsolete field. */ 882 + u32 reception_quality; 883 + u32 ews_alert_active; /* signals if EWS alert is currently on */ 884 + u32 lna_on_off; /* Internal LNA state: 0: OFF, 1: ON */ 885 885 886 - u32 RfAgcLevel; /* RF AGC Level [linear units], full gain = 65535 (20dB) */ 887 - u32 BbAgcLevel; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */ 888 - u32 FwErrorsCounter; /* Application errors - should be always zero */ 886 + u32 rf_agc_level; /* RF AGC Level [linear units], full gain = 65535 (20dB) */ 887 + u32 bb_agc_level; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */ 888 + u32 fw_errors_counter; /* Application errors - should be always zero */ 889 889 u8 FwErrorsHistoryArr[8]; /* Last FW errors IDs - first is most recent, last is oldest */ 890 890 891 891 s32 MRC_SNR; /* dB */ 892 - u32 SNRFullRes; /* dB x 65536 */ 893 - u32 Reserved4[4]; 892 + u32 snr_full_res; /* dB x 65536 */ 893 + u32 reserved4[4]; 894 894 }; 895 895 896 896 ··· 916 916 }; 917 917 918 918 #define CORRECT_STAT_RSSI(_stat) ((_stat).RSSI *= -1) 919 - #define CORRECT_STAT_BANDWIDTH(_stat) (_stat.Bandwidth = 8 - _stat.Bandwidth) 919 + #define CORRECT_STAT_BANDWIDTH(_stat) (_stat.bandwidth = 8 - _stat.bandwidth) 920 920 #define CORRECT_STAT_TRANSMISSON_MODE(_stat) \ 921 - if (_stat.TransmissionMode == 0) \ 922 - _stat.TransmissionMode = 2; \ 923 - else if (_stat.TransmissionMode == 1) \ 924 - _stat.TransmissionMode = 8; \ 921 + if (_stat.transmission_mode == 0) \ 922 + _stat.transmission_mode = 2; \ 923 + else if (_stat.transmission_mode == 1) \ 924 + _stat.transmission_mode = 8; \ 925 925 else \ 926 - _stat.TransmissionMode = 4; 926 + _stat.transmission_mode = 4; 927 927 928 928 struct TRANSMISSION_STATISTICS_S { 929 - u32 Frequency; /* Frequency in Hz */ 930 - u32 Bandwidth; /* Bandwidth in MHz */ 931 - u32 TransmissionMode; /* FFT mode carriers in Kilos */ 932 - u32 GuardInterval; /* Guard Interval from 929 + u32 frequency; /* frequency in Hz */ 930 + u32 bandwidth; /* bandwidth in MHz */ 931 + u32 transmission_mode; /* FFT mode carriers in Kilos */ 932 + u32 guard_interval; /* Guard Interval from 933 933 SMSHOSTLIB_GUARD_INTERVALS_ET */ 934 - u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */ 935 - u32 LPCodeRate; /* Low Priority Code Rate from 934 + u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */ 935 + u32 lp_code_rate; /* Low Priority Code Rate from 936 936 SMSHOSTLIB_CODE_RATE_ET */ 937 - u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */ 938 - u32 Constellation; /* Constellation from 937 + u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET */ 938 + u32 constellation; /* constellation from 939 939 SMSHOSTLIB_CONSTELLATION_ET */ 940 940 941 941 /* DVB-H TPS parameters */ 942 - u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 942 + u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero; 943 943 if set to 0xFFFFFFFF cell_id not yet recovered */ 944 - u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - 944 + u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 - 945 945 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 946 - u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - 946 + u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 - 947 947 Time Slicing indicator, bit 0 - MPE-FEC indicator */ 948 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 948 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 949 949 }; 950 950 951 951 struct RECEPTION_STATISTICS_S { 952 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 953 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 954 - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 952 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 953 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 954 + u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */ 955 955 956 - u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 956 + u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 957 957 s32 SNR; /* dB */ 958 958 u32 BER; /* Post Viterbi BER [1E-5] */ 959 - u32 BERErrorCount; /* Number of erronous SYNC bits. */ 960 - u32 BERBitCount; /* Total number of SYNC bits. */ 959 + u32 ber_error_count; /* Number of erronous SYNC bits. */ 960 + u32 ber_bit_count; /* Total number of SYNC bits. */ 961 961 u32 TS_PER; /* Transport stream PER, 962 962 0xFFFFFFFF indicate N/A */ 963 963 u32 MFER; /* DVB-H frame error rate in percentage, 964 964 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 965 965 s32 RSSI; /* dBm */ 966 - s32 InBandPwr; /* In band power in dBM */ 967 - s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 968 - u32 ErrorTSPackets; /* Number of erroneous 966 + s32 in_band_pwr; /* In band power in dBM */ 967 + s32 carrier_offset; /* Carrier Offset in bin/1024 */ 968 + u32 error_ts_packets; /* Number of erroneous 969 969 transport-stream packets */ 970 - u32 TotalTSPackets; /* Total number of transport-stream packets */ 970 + u32 total_ts_packets; /* Total number of transport-stream packets */ 971 971 972 972 s32 MRC_SNR; /* dB */ 973 973 s32 MRC_RSSI; /* dBm */ 974 - s32 MRC_InBandPwr; /* In band power in dBM */ 974 + s32 mrc_in_band_pwr; /* In band power in dBM */ 975 975 }; 976 976 977 977 struct RECEPTION_STATISTICS_EX_S { 978 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 979 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 980 - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 978 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 979 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 980 + u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */ 981 981 982 - u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 982 + u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 983 983 s32 SNR; /* dB */ 984 984 u32 BER; /* Post Viterbi BER [1E-5] */ 985 - u32 BERErrorCount; /* Number of erronous SYNC bits. */ 986 - u32 BERBitCount; /* Total number of SYNC bits. */ 985 + u32 ber_error_count; /* Number of erronous SYNC bits. */ 986 + u32 ber_bit_count; /* Total number of SYNC bits. */ 987 987 u32 TS_PER; /* Transport stream PER, 988 988 0xFFFFFFFF indicate N/A */ 989 989 u32 MFER; /* DVB-H frame error rate in percentage, 990 990 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 991 991 s32 RSSI; /* dBm */ 992 - s32 InBandPwr; /* In band power in dBM */ 993 - s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 994 - u32 ErrorTSPackets; /* Number of erroneous 992 + s32 in_band_pwr; /* In band power in dBM */ 993 + s32 carrier_offset; /* Carrier Offset in bin/1024 */ 994 + u32 error_ts_packets; /* Number of erroneous 995 995 transport-stream packets */ 996 - u32 TotalTSPackets; /* Total number of transport-stream packets */ 996 + u32 total_ts_packets; /* Total number of transport-stream packets */ 997 997 998 - s32 RefDevPPM; 999 - s32 FreqDevHz; 998 + s32 ref_dev_ppm; 999 + s32 freq_dev_hz; 1000 1000 1001 1001 s32 MRC_SNR; /* dB */ 1002 1002 s32 MRC_RSSI; /* dBm */ 1003 - s32 MRC_InBandPwr; /* In band power in dBM */ 1003 + s32 mrc_in_band_pwr; /* In band power in dBM */ 1004 1004 }; 1005 1005 1006 1006 1007 - /* Statistics information returned as response for 1008 - * SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */ 1007 + /* statistics information returned as response for 1008 + * SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */ 1009 1009 struct SMSHOSTLIB_STATISTICS_DVB_S { 1010 1010 /* Reception */ 1011 - struct RECEPTION_STATISTICS_S ReceptionData; 1011 + struct RECEPTION_STATISTICS_S reception_data; 1012 1012 1013 1013 /* Transmission parameters */ 1014 - struct TRANSMISSION_STATISTICS_S TransmissionData; 1014 + struct TRANSMISSION_STATISTICS_S transmission_data; 1015 1015 1016 1016 /* Burst parameters, valid only for DVB-H */ 1017 1017 #define SRVM_MAX_PID_FILTERS 8 1018 - struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS]; 1018 + struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS]; 1019 1019 }; 1020 1020 1021 - /* Statistics information returned as response for 1022 - * SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */ 1021 + /* statistics information returned as response for 1022 + * SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */ 1023 1023 struct SMSHOSTLIB_STATISTICS_DVB_EX_S { 1024 1024 /* Reception */ 1025 - struct RECEPTION_STATISTICS_EX_S ReceptionData; 1025 + struct RECEPTION_STATISTICS_EX_S reception_data; 1026 1026 1027 1027 /* Transmission parameters */ 1028 - struct TRANSMISSION_STATISTICS_S TransmissionData; 1028 + struct TRANSMISSION_STATISTICS_S transmission_data; 1029 1029 1030 1030 /* Burst parameters, valid only for DVB-H */ 1031 1031 #define SRVM_MAX_PID_FILTERS 8 1032 - struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS]; 1032 + struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS]; 1033 1033 }; 1034 1034 1035 1035 struct SRVM_SIGNAL_STATUS_S { 1036 1036 u32 result; 1037 1037 u32 snr; 1038 - u32 tsPackets; 1039 - u32 etsPackets; 1038 + u32 ts_packets; 1039 + u32 ets_packets; 1040 1040 u32 constellation; 1041 - u32 hpCode; 1042 - u32 tpsSrvIndLP; 1043 - u32 tpsSrvIndHP; 1044 - u32 cellId; 1041 + u32 hp_code; 1042 + u32 tps_srv_ind_lp; 1043 + u32 tps_srv_ind_hp; 1044 + u32 cell_id; 1045 1045 u32 reason; 1046 1046 1047 - s32 inBandPower; 1048 - u32 requestId; 1047 + s32 in_band_power; 1048 + u32 request_id; 1049 1049 }; 1050 1050 1051 1051 struct SMSHOSTLIB_I2C_REQ_ST { 1052 - u32 DeviceAddress; /* I2c device address */ 1053 - u32 WriteCount; /* number of bytes to write */ 1054 - u32 ReadCount; /* number of bytes to read */ 1052 + u32 device_address; /* I2c device address */ 1053 + u32 write_count; /* number of bytes to write */ 1054 + u32 read_count; /* number of bytes to read */ 1055 1055 u8 Data[1]; 1056 1056 }; 1057 1057 1058 1058 struct SMSHOSTLIB_I2C_RES_ST { 1059 - u32 Status; /* non-zero value in case of failure */ 1060 - u32 ReadCount; /* number of bytes read */ 1059 + u32 status; /* non-zero value in case of failure */ 1060 + u32 read_count; /* number of bytes read */ 1061 1061 u8 Data[1]; 1062 1062 }; 1063 1063 ··· 1154 1154 int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level); 1155 1155 1156 1156 /* new GPIO management */ 1157 - extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, 1158 - struct smscore_config_gpio *pGpioConfig); 1159 - extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum, 1160 - u8 NewLevel); 1161 - extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum, 1157 + extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num, 1158 + struct smscore_config_gpio *p_gpio_config); 1159 + extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num, 1160 + u8 new_level); 1161 + extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num, 1162 1162 u8 *level); 1163 1163 1164 1164 void smscore_set_board_id(struct smscore_device_t *core, int id);
+115 -115
drivers/media/common/siano/smsdvb-debugfs.c
··· 63 63 buf = debug_data->stats_data; 64 64 65 65 n += snprintf(&buf[n], PAGE_SIZE - n, 66 - "IsRfLocked = %d\n", p->IsRfLocked); 66 + "is_rf_locked = %d\n", p->is_rf_locked); 67 67 n += snprintf(&buf[n], PAGE_SIZE - n, 68 - "IsDemodLocked = %d\n", p->IsDemodLocked); 68 + "is_demod_locked = %d\n", p->is_demod_locked); 69 69 n += snprintf(&buf[n], PAGE_SIZE - n, 70 - "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 70 + "is_external_lna_on = %d\n", p->is_external_lna_on); 71 71 n += snprintf(&buf[n], PAGE_SIZE - n, 72 72 "SNR = %d\n", p->SNR); 73 73 n += snprintf(&buf[n], PAGE_SIZE - n, ··· 81 81 n += snprintf(&buf[n], PAGE_SIZE - n, 82 82 "RSSI = %d\n", p->RSSI); 83 83 n += snprintf(&buf[n], PAGE_SIZE - n, 84 - "InBandPwr = %d\n", p->InBandPwr); 84 + "in_band_pwr = %d\n", p->in_band_pwr); 85 85 n += snprintf(&buf[n], PAGE_SIZE - n, 86 - "CarrierOffset = %d\n", p->CarrierOffset); 86 + "carrier_offset = %d\n", p->carrier_offset); 87 87 n += snprintf(&buf[n], PAGE_SIZE - n, 88 - "ModemState = %d\n", p->ModemState); 88 + "modem_state = %d\n", p->modem_state); 89 89 n += snprintf(&buf[n], PAGE_SIZE - n, 90 - "Frequency = %d\n", p->Frequency); 90 + "frequency = %d\n", p->frequency); 91 91 n += snprintf(&buf[n], PAGE_SIZE - n, 92 - "Bandwidth = %d\n", p->Bandwidth); 92 + "bandwidth = %d\n", p->bandwidth); 93 93 n += snprintf(&buf[n], PAGE_SIZE - n, 94 - "TransmissionMode = %d\n", p->TransmissionMode); 94 + "transmission_mode = %d\n", p->transmission_mode); 95 95 n += snprintf(&buf[n], PAGE_SIZE - n, 96 - "ModemState = %d\n", p->ModemState); 96 + "modem_state = %d\n", p->modem_state); 97 97 n += snprintf(&buf[n], PAGE_SIZE - n, 98 - "GuardInterval = %d\n", p->GuardInterval); 98 + "guard_interval = %d\n", p->guard_interval); 99 99 n += snprintf(&buf[n], PAGE_SIZE - n, 100 - "CodeRate = %d\n", p->CodeRate); 100 + "code_rate = %d\n", p->code_rate); 101 101 n += snprintf(&buf[n], PAGE_SIZE - n, 102 - "LPCodeRate = %d\n", p->LPCodeRate); 102 + "lp_code_rate = %d\n", p->lp_code_rate); 103 103 n += snprintf(&buf[n], PAGE_SIZE - n, 104 - "Hierarchy = %d\n", p->Hierarchy); 104 + "hierarchy = %d\n", p->hierarchy); 105 105 n += snprintf(&buf[n], PAGE_SIZE - n, 106 - "Constellation = %d\n", p->Constellation); 106 + "constellation = %d\n", p->constellation); 107 107 n += snprintf(&buf[n], PAGE_SIZE - n, 108 - "BurstSize = %d\n", p->BurstSize); 108 + "burst_size = %d\n", p->burst_size); 109 109 n += snprintf(&buf[n], PAGE_SIZE - n, 110 - "BurstDuration = %d\n", p->BurstDuration); 110 + "burst_duration = %d\n", p->burst_duration); 111 111 n += snprintf(&buf[n], PAGE_SIZE - n, 112 - "BurstCycleTime = %d\n", p->BurstCycleTime); 112 + "burst_cycle_time = %d\n", p->burst_cycle_time); 113 113 n += snprintf(&buf[n], PAGE_SIZE - n, 114 - "CalculatedBurstCycleTime = %d\n", 115 - p->CalculatedBurstCycleTime); 114 + "calc_burst_cycle_time = %d\n", 115 + p->calc_burst_cycle_time); 116 116 n += snprintf(&buf[n], PAGE_SIZE - n, 117 - "NumOfRows = %d\n", p->NumOfRows); 117 + "num_of_rows = %d\n", p->num_of_rows); 118 118 n += snprintf(&buf[n], PAGE_SIZE - n, 119 - "NumOfPaddCols = %d\n", p->NumOfPaddCols); 119 + "num_of_padd_cols = %d\n", p->num_of_padd_cols); 120 120 n += snprintf(&buf[n], PAGE_SIZE - n, 121 - "NumOfPunctCols = %d\n", p->NumOfPunctCols); 121 + "num_of_punct_cols = %d\n", p->num_of_punct_cols); 122 122 n += snprintf(&buf[n], PAGE_SIZE - n, 123 - "ErrorTSPackets = %d\n", p->ErrorTSPackets); 123 + "error_ts_packets = %d\n", p->error_ts_packets); 124 124 n += snprintf(&buf[n], PAGE_SIZE - n, 125 - "TotalTSPackets = %d\n", p->TotalTSPackets); 125 + "total_ts_packets = %d\n", p->total_ts_packets); 126 126 n += snprintf(&buf[n], PAGE_SIZE - n, 127 - "NumOfValidMpeTlbs = %d\n", p->NumOfValidMpeTlbs); 127 + "num_of_valid_mpe_tlbs = %d\n", p->num_of_valid_mpe_tlbs); 128 128 n += snprintf(&buf[n], PAGE_SIZE - n, 129 - "NumOfInvalidMpeTlbs = %d\n", p->NumOfInvalidMpeTlbs); 129 + "num_of_invalid_mpe_tlbs = %d\n", p->num_of_invalid_mpe_tlbs); 130 130 n += snprintf(&buf[n], PAGE_SIZE - n, 131 - "NumOfCorrectedMpeTlbs = %d\n", p->NumOfCorrectedMpeTlbs); 131 + "num_of_corrected_mpe_tlbs = %d\n", p->num_of_corrected_mpe_tlbs); 132 132 n += snprintf(&buf[n], PAGE_SIZE - n, 133 - "BERErrorCount = %d\n", p->BERErrorCount); 133 + "ber_error_count = %d\n", p->ber_error_count); 134 134 n += snprintf(&buf[n], PAGE_SIZE - n, 135 - "BERBitCount = %d\n", p->BERBitCount); 135 + "ber_bit_count = %d\n", p->ber_bit_count); 136 136 n += snprintf(&buf[n], PAGE_SIZE - n, 137 - "SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors); 137 + "sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors); 138 138 n += snprintf(&buf[n], PAGE_SIZE - n, 139 - "PreBER = %d\n", p->PreBER); 139 + "pre_ber = %d\n", p->pre_ber); 140 140 n += snprintf(&buf[n], PAGE_SIZE - n, 141 - "CellId = %d\n", p->CellId); 141 + "cell_id = %d\n", p->cell_id); 142 142 n += snprintf(&buf[n], PAGE_SIZE - n, 143 - "DvbhSrvIndHP = %d\n", p->DvbhSrvIndHP); 143 + "dvbh_srv_ind_hp = %d\n", p->dvbh_srv_ind_hp); 144 144 n += snprintf(&buf[n], PAGE_SIZE - n, 145 - "DvbhSrvIndLP = %d\n", p->DvbhSrvIndLP); 145 + "dvbh_srv_ind_lp = %d\n", p->dvbh_srv_ind_lp); 146 146 n += snprintf(&buf[n], PAGE_SIZE - n, 147 - "NumMPEReceived = %d\n", p->NumMPEReceived); 147 + "num_mpe_received = %d\n", p->num_mpe_received); 148 148 149 149 debug_data->stats_count = n; 150 150 spin_unlock(&debug_data->lock); ··· 166 166 buf = debug_data->stats_data; 167 167 168 168 n += snprintf(&buf[n], PAGE_SIZE - n, 169 - "StatisticsType = %d\t", p->StatisticsType); 169 + "statistics_type = %d\t", p->statistics_type); 170 170 n += snprintf(&buf[n], PAGE_SIZE - n, 171 - "FullSize = %d\n", p->FullSize); 171 + "full_size = %d\n", p->full_size); 172 172 173 173 n += snprintf(&buf[n], PAGE_SIZE - n, 174 - "IsRfLocked = %d\t\t", p->IsRfLocked); 174 + "is_rf_locked = %d\t\t", p->is_rf_locked); 175 175 n += snprintf(&buf[n], PAGE_SIZE - n, 176 - "IsDemodLocked = %d\t", p->IsDemodLocked); 176 + "is_demod_locked = %d\t", p->is_demod_locked); 177 177 n += snprintf(&buf[n], PAGE_SIZE - n, 178 - "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 178 + "is_external_lna_on = %d\n", p->is_external_lna_on); 179 179 n += snprintf(&buf[n], PAGE_SIZE - n, 180 180 "SNR = %d dB\t\t", p->SNR); 181 181 n += snprintf(&buf[n], PAGE_SIZE - n, 182 182 "RSSI = %d dBm\t\t", p->RSSI); 183 183 n += snprintf(&buf[n], PAGE_SIZE - n, 184 - "InBandPwr = %d dBm\n", p->InBandPwr); 184 + "in_band_pwr = %d dBm\n", p->in_band_pwr); 185 185 n += snprintf(&buf[n], PAGE_SIZE - n, 186 - "CarrierOffset = %d\t", p->CarrierOffset); 186 + "carrier_offset = %d\t", p->carrier_offset); 187 187 n += snprintf(&buf[n], PAGE_SIZE - n, 188 - "Bandwidth = %d\t\t", p->Bandwidth); 188 + "bandwidth = %d\t\t", p->bandwidth); 189 189 n += snprintf(&buf[n], PAGE_SIZE - n, 190 - "Frequency = %d Hz\n", p->Frequency); 190 + "frequency = %d Hz\n", p->frequency); 191 191 n += snprintf(&buf[n], PAGE_SIZE - n, 192 - "TransmissionMode = %d\t", p->TransmissionMode); 192 + "transmission_mode = %d\t", p->transmission_mode); 193 193 n += snprintf(&buf[n], PAGE_SIZE - n, 194 - "ModemState = %d\t\t", p->ModemState); 194 + "modem_state = %d\t\t", p->modem_state); 195 195 n += snprintf(&buf[n], PAGE_SIZE - n, 196 - "GuardInterval = %d\n", p->GuardInterval); 196 + "guard_interval = %d\n", p->guard_interval); 197 197 n += snprintf(&buf[n], PAGE_SIZE - n, 198 - "SystemType = %d\t\t", p->SystemType); 198 + "system_type = %d\t\t", p->system_type); 199 199 n += snprintf(&buf[n], PAGE_SIZE - n, 200 - "PartialReception = %d\t", p->PartialReception); 200 + "partial_reception = %d\t", p->partial_reception); 201 201 n += snprintf(&buf[n], PAGE_SIZE - n, 202 - "NumOfLayers = %d\n", p->NumOfLayers); 202 + "num_of_layers = %d\n", p->num_of_layers); 203 203 n += snprintf(&buf[n], PAGE_SIZE - n, 204 - "SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors); 204 + "sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors); 205 205 206 206 for (i = 0; i < 3; i++) { 207 - if (p->LayerInfo[i].NumberOfSegments < 1 || 208 - p->LayerInfo[i].NumberOfSegments > 13) 207 + if (p->LayerInfo[i].number_of_segments < 1 || 208 + p->LayerInfo[i].number_of_segments > 13) 209 209 continue; 210 210 211 211 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i); 212 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t", 213 - p->LayerInfo[i].CodeRate); 214 - n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n", 215 - p->LayerInfo[i].Constellation); 212 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t", 213 + p->LayerInfo[i].code_rate); 214 + n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n", 215 + p->LayerInfo[i].constellation); 216 216 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t", 217 217 p->LayerInfo[i].BER); 218 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t", 219 - p->LayerInfo[i].BERErrorCount); 220 - n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n", 221 - p->LayerInfo[i].BERBitCount); 222 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t", 223 - p->LayerInfo[i].PreBER); 218 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t", 219 + p->LayerInfo[i].ber_error_count); 220 + n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n", 221 + p->LayerInfo[i].ber_bit_count); 222 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t", 223 + p->LayerInfo[i].pre_ber); 224 224 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n", 225 225 p->LayerInfo[i].TS_PER); 226 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t", 227 - p->LayerInfo[i].ErrorTSPackets); 228 - n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t", 229 - p->LayerInfo[i].TotalTSPackets); 230 - n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n", 231 - p->LayerInfo[i].TILdepthI); 226 + n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t", 227 + p->LayerInfo[i].error_ts_packets); 228 + n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t", 229 + p->LayerInfo[i].total_ts_packets); 230 + n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n", 231 + p->LayerInfo[i].ti_ldepth_i); 232 232 n += snprintf(&buf[n], PAGE_SIZE - n, 233 - "\tNumberOfSegments = %d\t", 234 - p->LayerInfo[i].NumberOfSegments); 235 - n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n", 236 - p->LayerInfo[i].TMCCErrors); 233 + "\tnumber_of_segments = %d\t", 234 + p->LayerInfo[i].number_of_segments); 235 + n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n", 236 + p->LayerInfo[i].tmcc_errors); 237 237 } 238 238 239 239 debug_data->stats_count = n; ··· 256 256 buf = debug_data->stats_data; 257 257 258 258 n += snprintf(&buf[n], PAGE_SIZE - n, 259 - "StatisticsType = %d\t", p->StatisticsType); 259 + "statistics_type = %d\t", p->statistics_type); 260 260 n += snprintf(&buf[n], PAGE_SIZE - n, 261 - "FullSize = %d\n", p->FullSize); 261 + "full_size = %d\n", p->full_size); 262 262 263 263 n += snprintf(&buf[n], PAGE_SIZE - n, 264 - "IsRfLocked = %d\t\t", p->IsRfLocked); 264 + "is_rf_locked = %d\t\t", p->is_rf_locked); 265 265 n += snprintf(&buf[n], PAGE_SIZE - n, 266 - "IsDemodLocked = %d\t", p->IsDemodLocked); 266 + "is_demod_locked = %d\t", p->is_demod_locked); 267 267 n += snprintf(&buf[n], PAGE_SIZE - n, 268 - "IsExternalLNAOn = %d\n", p->IsExternalLNAOn); 268 + "is_external_lna_on = %d\n", p->is_external_lna_on); 269 269 n += snprintf(&buf[n], PAGE_SIZE - n, 270 270 "SNR = %d dB\t\t", p->SNR); 271 271 n += snprintf(&buf[n], PAGE_SIZE - n, 272 272 "RSSI = %d dBm\t\t", p->RSSI); 273 273 n += snprintf(&buf[n], PAGE_SIZE - n, 274 - "InBandPwr = %d dBm\n", p->InBandPwr); 274 + "in_band_pwr = %d dBm\n", p->in_band_pwr); 275 275 n += snprintf(&buf[n], PAGE_SIZE - n, 276 - "CarrierOffset = %d\t", p->CarrierOffset); 276 + "carrier_offset = %d\t", p->carrier_offset); 277 277 n += snprintf(&buf[n], PAGE_SIZE - n, 278 - "Bandwidth = %d\t\t", p->Bandwidth); 278 + "bandwidth = %d\t\t", p->bandwidth); 279 279 n += snprintf(&buf[n], PAGE_SIZE - n, 280 - "Frequency = %d Hz\n", p->Frequency); 280 + "frequency = %d Hz\n", p->frequency); 281 281 n += snprintf(&buf[n], PAGE_SIZE - n, 282 - "TransmissionMode = %d\t", p->TransmissionMode); 282 + "transmission_mode = %d\t", p->transmission_mode); 283 283 n += snprintf(&buf[n], PAGE_SIZE - n, 284 - "ModemState = %d\t\t", p->ModemState); 284 + "modem_state = %d\t\t", p->modem_state); 285 285 n += snprintf(&buf[n], PAGE_SIZE - n, 286 - "GuardInterval = %d\n", p->GuardInterval); 286 + "guard_interval = %d\n", p->guard_interval); 287 287 n += snprintf(&buf[n], PAGE_SIZE - n, 288 - "SystemType = %d\t\t", p->SystemType); 288 + "system_type = %d\t\t", p->system_type); 289 289 n += snprintf(&buf[n], PAGE_SIZE - n, 290 - "PartialReception = %d\t", p->PartialReception); 290 + "partial_reception = %d\t", p->partial_reception); 291 291 n += snprintf(&buf[n], PAGE_SIZE - n, 292 - "NumOfLayers = %d\n", p->NumOfLayers); 293 - n += snprintf(&buf[n], PAGE_SIZE - n, "SegmentNumber = %d\t", 294 - p->SegmentNumber); 295 - n += snprintf(&buf[n], PAGE_SIZE - n, "TuneBW = %d\n", 296 - p->TuneBW); 292 + "num_of_layers = %d\n", p->num_of_layers); 293 + n += snprintf(&buf[n], PAGE_SIZE - n, "segment_number = %d\t", 294 + p->segment_number); 295 + n += snprintf(&buf[n], PAGE_SIZE - n, "tune_bw = %d\n", 296 + p->tune_bw); 297 297 298 298 for (i = 0; i < 3; i++) { 299 - if (p->LayerInfo[i].NumberOfSegments < 1 || 300 - p->LayerInfo[i].NumberOfSegments > 13) 299 + if (p->LayerInfo[i].number_of_segments < 1 || 300 + p->LayerInfo[i].number_of_segments > 13) 301 301 continue; 302 302 303 303 n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i); 304 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t", 305 - p->LayerInfo[i].CodeRate); 306 - n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n", 307 - p->LayerInfo[i].Constellation); 304 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t", 305 + p->LayerInfo[i].code_rate); 306 + n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n", 307 + p->LayerInfo[i].constellation); 308 308 n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t", 309 309 p->LayerInfo[i].BER); 310 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t", 311 - p->LayerInfo[i].BERErrorCount); 312 - n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n", 313 - p->LayerInfo[i].BERBitCount); 314 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t", 315 - p->LayerInfo[i].PreBER); 310 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t", 311 + p->LayerInfo[i].ber_error_count); 312 + n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n", 313 + p->LayerInfo[i].ber_bit_count); 314 + n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t", 315 + p->LayerInfo[i].pre_ber); 316 316 n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n", 317 317 p->LayerInfo[i].TS_PER); 318 - n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t", 319 - p->LayerInfo[i].ErrorTSPackets); 320 - n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t", 321 - p->LayerInfo[i].TotalTSPackets); 322 - n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n", 323 - p->LayerInfo[i].TILdepthI); 318 + n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t", 319 + p->LayerInfo[i].error_ts_packets); 320 + n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t", 321 + p->LayerInfo[i].total_ts_packets); 322 + n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n", 323 + p->LayerInfo[i].ti_ldepth_i); 324 324 n += snprintf(&buf[n], PAGE_SIZE - n, 325 - "\tNumberOfSegments = %d\t", 326 - p->LayerInfo[i].NumberOfSegments); 327 - n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n", 328 - p->LayerInfo[i].TMCCErrors); 325 + "\tnumber_of_segments = %d\t", 326 + p->LayerInfo[i].number_of_segments); 327 + n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n", 328 + p->LayerInfo[i].tmcc_errors); 329 329 } 330 330 331 331
+125 -125
drivers/media/common/siano/smsdvb-main.c
··· 228 228 struct dvb_frontend *fe = &client->frontend; 229 229 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 230 230 231 - c->frequency = p->Frequency; 232 - client->fe_status = sms_to_status(p->IsDemodLocked, 0); 233 - c->bandwidth_hz = sms_to_bw(p->Bandwidth); 234 - c->transmission_mode = sms_to_mode(p->TransmissionMode); 235 - c->guard_interval = sms_to_guard_interval(p->GuardInterval); 236 - c->code_rate_HP = sms_to_code_rate(p->CodeRate); 237 - c->code_rate_LP = sms_to_code_rate(p->LPCodeRate); 238 - c->hierarchy = sms_to_hierarchy(p->Hierarchy); 239 - c->modulation = sms_to_modulation(p->Constellation); 231 + c->frequency = p->frequency; 232 + client->fe_status = sms_to_status(p->is_demod_locked, 0); 233 + c->bandwidth_hz = sms_to_bw(p->bandwidth); 234 + c->transmission_mode = sms_to_mode(p->transmission_mode); 235 + c->guard_interval = sms_to_guard_interval(p->guard_interval); 236 + c->code_rate_HP = sms_to_code_rate(p->code_rate); 237 + c->code_rate_LP = sms_to_code_rate(p->lp_code_rate); 238 + c->hierarchy = sms_to_hierarchy(p->hierarchy); 239 + c->modulation = sms_to_modulation(p->constellation); 240 240 } 241 241 242 242 static void smsdvb_update_per_slices(struct smsdvb_client_t *client, ··· 245 245 struct dvb_frontend *fe = &client->frontend; 246 246 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 247 247 248 - client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 248 + client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked); 249 249 c->modulation = sms_to_modulation(p->constellation); 250 250 251 - /* Signal Strength, in DBm */ 252 - c->strength.stat[0].uvalue = p->inBandPower * 1000; 251 + /* signal Strength, in DBm */ 252 + c->strength.stat[0].uvalue = p->in_band_power * 1000; 253 253 254 - /* Carrier to Noise ratio, in DB */ 254 + /* Carrier to noise ratio, in DB */ 255 255 c->cnr.stat[0].svalue = p->snr * 1000; 256 256 257 257 /* PER/BER requires demod lock */ 258 - if (!p->IsDemodLocked) 258 + if (!p->is_demod_locked) 259 259 return; 260 260 261 261 /* TS PER */ 262 262 client->last_per = c->block_error.stat[0].uvalue; 263 263 c->block_error.stat[0].scale = FE_SCALE_COUNTER; 264 264 c->block_count.stat[0].scale = FE_SCALE_COUNTER; 265 - c->block_error.stat[0].uvalue += p->etsPackets; 266 - c->block_count.stat[0].uvalue += p->etsPackets + p->tsPackets; 265 + c->block_error.stat[0].uvalue += p->ets_packets; 266 + c->block_count.stat[0].uvalue += p->ets_packets + p->ts_packets; 267 267 268 268 /* BER */ 269 269 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER; 270 270 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER; 271 - c->post_bit_error.stat[0].uvalue += p->BERErrorCount; 272 - c->post_bit_count.stat[0].uvalue += p->BERBitCount; 271 + c->post_bit_error.stat[0].uvalue += p->ber_error_count; 272 + c->post_bit_count.stat[0].uvalue += p->ber_bit_count; 273 273 274 274 /* Legacy PER/BER */ 275 - client->legacy_per = (p->etsPackets * 65535) / 276 - (p->tsPackets + p->etsPackets); 275 + client->legacy_per = (p->ets_packets * 65535) / 276 + (p->ts_packets + p->ets_packets); 277 277 } 278 278 279 279 static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client, ··· 285 285 if (client->prt_dvb_stats) 286 286 client->prt_dvb_stats(client->debug_data, p); 287 287 288 - client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 288 + client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked); 289 289 290 290 /* Update DVB modulation parameters */ 291 - c->frequency = p->Frequency; 292 - client->fe_status = sms_to_status(p->IsDemodLocked, 0); 293 - c->bandwidth_hz = sms_to_bw(p->Bandwidth); 294 - c->transmission_mode = sms_to_mode(p->TransmissionMode); 295 - c->guard_interval = sms_to_guard_interval(p->GuardInterval); 296 - c->code_rate_HP = sms_to_code_rate(p->CodeRate); 297 - c->code_rate_LP = sms_to_code_rate(p->LPCodeRate); 298 - c->hierarchy = sms_to_hierarchy(p->Hierarchy); 299 - c->modulation = sms_to_modulation(p->Constellation); 291 + c->frequency = p->frequency; 292 + client->fe_status = sms_to_status(p->is_demod_locked, 0); 293 + c->bandwidth_hz = sms_to_bw(p->bandwidth); 294 + c->transmission_mode = sms_to_mode(p->transmission_mode); 295 + c->guard_interval = sms_to_guard_interval(p->guard_interval); 296 + c->code_rate_HP = sms_to_code_rate(p->code_rate); 297 + c->code_rate_LP = sms_to_code_rate(p->lp_code_rate); 298 + c->hierarchy = sms_to_hierarchy(p->hierarchy); 299 + c->modulation = sms_to_modulation(p->constellation); 300 300 301 301 /* update reception data */ 302 - c->lna = p->IsExternalLNAOn ? 1 : 0; 302 + c->lna = p->is_external_lna_on ? 1 : 0; 303 303 304 - /* Carrier to Noise ratio, in DB */ 304 + /* Carrier to noise ratio, in DB */ 305 305 c->cnr.stat[0].svalue = p->SNR * 1000; 306 306 307 - /* Signal Strength, in DBm */ 308 - c->strength.stat[0].uvalue = p->InBandPwr * 1000; 307 + /* signal Strength, in DBm */ 308 + c->strength.stat[0].uvalue = p->in_band_pwr * 1000; 309 309 310 310 /* PER/BER requires demod lock */ 311 - if (!p->IsDemodLocked) 311 + if (!p->is_demod_locked) 312 312 return; 313 313 314 314 /* TS PER */ 315 315 client->last_per = c->block_error.stat[0].uvalue; 316 316 c->block_error.stat[0].scale = FE_SCALE_COUNTER; 317 317 c->block_count.stat[0].scale = FE_SCALE_COUNTER; 318 - c->block_error.stat[0].uvalue += p->ErrorTSPackets; 319 - c->block_count.stat[0].uvalue += p->TotalTSPackets; 318 + c->block_error.stat[0].uvalue += p->error_ts_packets; 319 + c->block_count.stat[0].uvalue += p->total_ts_packets; 320 320 321 321 /* BER */ 322 322 c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER; 323 323 c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER; 324 - c->post_bit_error.stat[0].uvalue += p->BERErrorCount; 325 - c->post_bit_count.stat[0].uvalue += p->BERBitCount; 324 + c->post_bit_error.stat[0].uvalue += p->ber_error_count; 325 + c->post_bit_count.stat[0].uvalue += p->ber_bit_count; 326 326 327 327 /* Legacy PER/BER */ 328 328 client->legacy_ber = p->BER; ··· 339 339 if (client->prt_isdb_stats) 340 340 client->prt_isdb_stats(client->debug_data, p); 341 341 342 - client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked); 342 + client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked); 343 343 344 344 /* 345 345 * Firmware 2.1 seems to report only lock status and 346 - * Signal strength. The signal strength indicator is at the 346 + * signal strength. The signal strength indicator is at the 347 347 * wrong field. 348 348 */ 349 - if (p->StatisticsType == 0) { 350 - c->strength.stat[0].uvalue = ((s32)p->TransmissionMode) * 1000; 349 + if (p->statistics_type == 0) { 350 + c->strength.stat[0].uvalue = ((s32)p->transmission_mode) * 1000; 351 351 c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; 352 352 return; 353 353 } 354 354 355 355 /* Update ISDB-T transmission parameters */ 356 - c->frequency = p->Frequency; 357 - c->bandwidth_hz = sms_to_bw(p->Bandwidth); 358 - c->transmission_mode = sms_to_mode(p->TransmissionMode); 359 - c->guard_interval = sms_to_guard_interval(p->GuardInterval); 360 - c->isdbt_partial_reception = p->PartialReception ? 1 : 0; 361 - n_layers = p->NumOfLayers; 356 + c->frequency = p->frequency; 357 + c->bandwidth_hz = sms_to_bw(p->bandwidth); 358 + c->transmission_mode = sms_to_mode(p->transmission_mode); 359 + c->guard_interval = sms_to_guard_interval(p->guard_interval); 360 + c->isdbt_partial_reception = p->partial_reception ? 1 : 0; 361 + n_layers = p->num_of_layers; 362 362 if (n_layers < 1) 363 363 n_layers = 1; 364 364 if (n_layers > 3) ··· 366 366 c->isdbt_layer_enabled = 0; 367 367 368 368 /* update reception data */ 369 - c->lna = p->IsExternalLNAOn ? 1 : 0; 369 + c->lna = p->is_external_lna_on ? 1 : 0; 370 370 371 - /* Carrier to Noise ratio, in DB */ 371 + /* Carrier to noise ratio, in DB */ 372 372 c->cnr.stat[0].svalue = p->SNR * 1000; 373 373 374 - /* Signal Strength, in DBm */ 375 - c->strength.stat[0].uvalue = p->InBandPwr * 1000; 374 + /* signal Strength, in DBm */ 375 + c->strength.stat[0].uvalue = p->in_band_pwr * 1000; 376 376 377 377 /* PER/BER and per-layer stats require demod lock */ 378 - if (!p->IsDemodLocked) 378 + if (!p->is_demod_locked) 379 379 return; 380 380 381 381 client->last_per = c->block_error.stat[0].uvalue; ··· 394 394 lr = &p->LayerInfo[i]; 395 395 396 396 /* Update per-layer transmission parameters */ 397 - if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) { 397 + if (lr->number_of_segments > 0 && lr->number_of_segments < 13) { 398 398 c->isdbt_layer_enabled |= 1 << i; 399 - c->layer[i].segment_count = lr->NumberOfSegments; 399 + c->layer[i].segment_count = lr->number_of_segments; 400 400 } else { 401 401 continue; 402 402 } 403 - c->layer[i].modulation = sms_to_modulation(lr->Constellation); 403 + c->layer[i].modulation = sms_to_modulation(lr->constellation); 404 404 405 405 /* TS PER */ 406 406 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER; 407 407 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER; 408 - c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets; 409 - c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets; 408 + c->block_error.stat[i + 1].uvalue += lr->error_ts_packets; 409 + c->block_count.stat[i + 1].uvalue += lr->total_ts_packets; 410 410 411 411 /* Update global PER counter */ 412 - c->block_error.stat[0].uvalue += lr->ErrorTSPackets; 413 - c->block_count.stat[0].uvalue += lr->TotalTSPackets; 412 + c->block_error.stat[0].uvalue += lr->error_ts_packets; 413 + c->block_count.stat[0].uvalue += lr->total_ts_packets; 414 414 415 415 /* BER */ 416 416 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER; 417 417 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER; 418 - c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount; 419 - c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount; 418 + c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count; 419 + c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count; 420 420 421 421 /* Update global BER counter */ 422 - c->post_bit_error.stat[0].uvalue += lr->BERErrorCount; 423 - c->post_bit_count.stat[0].uvalue += lr->BERBitCount; 422 + c->post_bit_error.stat[0].uvalue += lr->ber_error_count; 423 + c->post_bit_count.stat[0].uvalue += lr->ber_bit_count; 424 424 } 425 425 } 426 426 ··· 436 436 client->prt_isdb_stats_ex(client->debug_data, p); 437 437 438 438 /* Update ISDB-T transmission parameters */ 439 - c->frequency = p->Frequency; 440 - client->fe_status = sms_to_status(p->IsDemodLocked, 0); 441 - c->bandwidth_hz = sms_to_bw(p->Bandwidth); 442 - c->transmission_mode = sms_to_mode(p->TransmissionMode); 443 - c->guard_interval = sms_to_guard_interval(p->GuardInterval); 444 - c->isdbt_partial_reception = p->PartialReception ? 1 : 0; 445 - n_layers = p->NumOfLayers; 439 + c->frequency = p->frequency; 440 + client->fe_status = sms_to_status(p->is_demod_locked, 0); 441 + c->bandwidth_hz = sms_to_bw(p->bandwidth); 442 + c->transmission_mode = sms_to_mode(p->transmission_mode); 443 + c->guard_interval = sms_to_guard_interval(p->guard_interval); 444 + c->isdbt_partial_reception = p->partial_reception ? 1 : 0; 445 + n_layers = p->num_of_layers; 446 446 if (n_layers < 1) 447 447 n_layers = 1; 448 448 if (n_layers > 3) ··· 450 450 c->isdbt_layer_enabled = 0; 451 451 452 452 /* update reception data */ 453 - c->lna = p->IsExternalLNAOn ? 1 : 0; 453 + c->lna = p->is_external_lna_on ? 1 : 0; 454 454 455 - /* Carrier to Noise ratio, in DB */ 455 + /* Carrier to noise ratio, in DB */ 456 456 c->cnr.stat[0].svalue = p->SNR * 1000; 457 457 458 - /* Signal Strength, in DBm */ 459 - c->strength.stat[0].uvalue = p->InBandPwr * 1000; 458 + /* signal Strength, in DBm */ 459 + c->strength.stat[0].uvalue = p->in_band_pwr * 1000; 460 460 461 461 /* PER/BER and per-layer stats require demod lock */ 462 - if (!p->IsDemodLocked) 462 + if (!p->is_demod_locked) 463 463 return; 464 464 465 465 client->last_per = c->block_error.stat[0].uvalue; ··· 482 482 lr = &p->LayerInfo[i]; 483 483 484 484 /* Update per-layer transmission parameters */ 485 - if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) { 485 + if (lr->number_of_segments > 0 && lr->number_of_segments < 13) { 486 486 c->isdbt_layer_enabled |= 1 << i; 487 - c->layer[i].segment_count = lr->NumberOfSegments; 487 + c->layer[i].segment_count = lr->number_of_segments; 488 488 } else { 489 489 continue; 490 490 } 491 - c->layer[i].modulation = sms_to_modulation(lr->Constellation); 491 + c->layer[i].modulation = sms_to_modulation(lr->constellation); 492 492 493 493 /* TS PER */ 494 494 c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER; 495 495 c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER; 496 - c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets; 497 - c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets; 496 + c->block_error.stat[i + 1].uvalue += lr->error_ts_packets; 497 + c->block_count.stat[i + 1].uvalue += lr->total_ts_packets; 498 498 499 499 /* Update global PER counter */ 500 - c->block_error.stat[0].uvalue += lr->ErrorTSPackets; 501 - c->block_count.stat[0].uvalue += lr->TotalTSPackets; 500 + c->block_error.stat[0].uvalue += lr->error_ts_packets; 501 + c->block_count.stat[0].uvalue += lr->total_ts_packets; 502 502 503 503 /* BER */ 504 504 c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER; 505 505 c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER; 506 - c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount; 507 - c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount; 506 + c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count; 507 + c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count; 508 508 509 509 /* Update global BER counter */ 510 - c->post_bit_error.stat[0].uvalue += lr->BERErrorCount; 511 - c->post_bit_count.stat[0].uvalue += lr->BERBitCount; 510 + c->post_bit_error.stat[0].uvalue += lr->ber_error_count; 511 + c->post_bit_count.stat[0].uvalue += lr->ber_bit_count; 512 512 } 513 513 } 514 514 515 515 static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) 516 516 { 517 517 struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; 518 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) (((u8 *) cb->p) 518 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) (((u8 *) cb->p) 519 519 + cb->offset); 520 520 void *p = phdr + 1; 521 521 struct dvb_frontend *fe = &client->frontend; 522 522 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 523 523 bool is_status_update = false; 524 524 525 - switch (phdr->msgType) { 525 + switch (phdr->msg_type) { 526 526 case MSG_SMS_DVBT_BDA_DATA: 527 527 /* 528 528 * Only feed data to dvb demux if are there any feed listening ··· 530 530 */ 531 531 if (client->feed_users && client->has_tuned) 532 532 dvb_dmx_swfilter(&client->demux, p, 533 - cb->size - sizeof(struct SmsMsgHdr_ST)); 533 + cb->size - sizeof(struct sms_msg_hdr)); 534 534 break; 535 535 536 536 case MSG_SMS_RF_TUNE_RES: ··· 571 571 smsdvb_update_isdbt_stats(client, p); 572 572 break; 573 573 default: 574 - /* Skip SmsMsgStatisticsInfo_ST:RequestResult field */ 574 + /* Skip sms_msg_statistics_info:request_result field */ 575 575 smsdvb_update_dvb_stats(client, p + sizeof(u32)); 576 576 } 577 577 ··· 580 580 581 581 /* Only for ISDB-T */ 582 582 case MSG_SMS_GET_STATISTICS_EX_RES: 583 - /* Skip SmsMsgStatisticsInfo_ST:RequestResult field? */ 583 + /* Skip sms_msg_statistics_info:request_result field? */ 584 584 smsdvb_update_isdbt_stats_ex(client, p + sizeof(u32)); 585 585 is_status_update = true; 586 586 break; ··· 636 636 { 637 637 struct smsdvb_client_t *client = 638 638 container_of(feed->demux, struct smsdvb_client_t, demux); 639 - struct SmsMsgData_ST PidMsg; 639 + struct sms_msg_data PidMsg; 640 640 641 641 sms_debug("add pid %d(%x)", 642 642 feed->pid, feed->pid); 643 643 644 644 client->feed_users++; 645 645 646 - PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 647 - PidMsg.xMsgHeader.msgDstId = HIF_TASK; 648 - PidMsg.xMsgHeader.msgFlags = 0; 649 - PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ; 650 - PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); 646 + PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 647 + PidMsg.x_msg_header.msg_dst_id = HIF_TASK; 648 + PidMsg.x_msg_header.msg_flags = 0; 649 + PidMsg.x_msg_header.msg_type = MSG_SMS_ADD_PID_FILTER_REQ; 650 + PidMsg.x_msg_header.msg_length = sizeof(PidMsg); 651 651 PidMsg.msgData[0] = feed->pid; 652 652 653 653 return smsclient_sendrequest(client->smsclient, ··· 658 658 { 659 659 struct smsdvb_client_t *client = 660 660 container_of(feed->demux, struct smsdvb_client_t, demux); 661 - struct SmsMsgData_ST PidMsg; 661 + struct sms_msg_data PidMsg; 662 662 663 663 sms_debug("remove pid %d(%x)", 664 664 feed->pid, feed->pid); 665 665 666 666 client->feed_users--; 667 667 668 - PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 669 - PidMsg.xMsgHeader.msgDstId = HIF_TASK; 670 - PidMsg.xMsgHeader.msgFlags = 0; 671 - PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ; 672 - PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); 668 + PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 669 + PidMsg.x_msg_header.msg_dst_id = HIF_TASK; 670 + PidMsg.x_msg_header.msg_flags = 0; 671 + PidMsg.x_msg_header.msg_type = MSG_SMS_REMOVE_PID_FILTER_REQ; 672 + PidMsg.x_msg_header.msg_length = sizeof(PidMsg); 673 673 PidMsg.msgData[0] = feed->pid; 674 674 675 675 return smsclient_sendrequest(client->smsclient, ··· 694 694 static int smsdvb_send_statistics_request(struct smsdvb_client_t *client) 695 695 { 696 696 int rc; 697 - struct SmsMsgHdr_ST Msg; 697 + struct sms_msg_hdr Msg; 698 698 699 699 /* Don't request stats too fast */ 700 700 if (client->get_stats_jiffies && ··· 702 702 return 0; 703 703 client->get_stats_jiffies = jiffies + msecs_to_jiffies(100); 704 704 705 - Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 706 - Msg.msgDstId = HIF_TASK; 707 - Msg.msgFlags = 0; 708 - Msg.msgLength = sizeof(Msg); 705 + Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 706 + Msg.msg_dst_id = HIF_TASK; 707 + Msg.msg_flags = 0; 708 + Msg.msg_length = sizeof(Msg); 709 709 710 710 switch (smscore_get_device_mode(client->coredev)) { 711 711 case DEVICE_MODE_ISDBT: ··· 714 714 * Check for firmware version, to avoid breaking for old cards 715 715 */ 716 716 if (client->coredev->fw_version >= 0x800) 717 - Msg.msgType = MSG_SMS_GET_STATISTICS_EX_REQ; 717 + Msg.msg_type = MSG_SMS_GET_STATISTICS_EX_REQ; 718 718 else 719 - Msg.msgType = MSG_SMS_GET_STATISTICS_REQ; 719 + Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ; 720 720 break; 721 721 default: 722 - Msg.msgType = MSG_SMS_GET_STATISTICS_REQ; 722 + Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ; 723 723 } 724 724 725 725 rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), ··· 845 845 container_of(fe, struct smsdvb_client_t, frontend); 846 846 847 847 struct { 848 - struct SmsMsgHdr_ST Msg; 848 + struct sms_msg_hdr Msg; 849 849 u32 Data[3]; 850 850 } Msg; 851 851 ··· 856 856 client->event_unc_state = -1; 857 857 fe->dtv_property_cache.delivery_system = SYS_DVBT; 858 858 859 - Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 860 - Msg.Msg.msgDstId = HIF_TASK; 861 - Msg.Msg.msgFlags = 0; 862 - Msg.Msg.msgType = MSG_SMS_RF_TUNE_REQ; 863 - Msg.Msg.msgLength = sizeof(Msg); 859 + Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 860 + Msg.Msg.msg_dst_id = HIF_TASK; 861 + Msg.Msg.msg_flags = 0; 862 + Msg.Msg.msg_type = MSG_SMS_RF_TUNE_REQ; 863 + Msg.Msg.msg_length = sizeof(Msg); 864 864 Msg.Data[0] = c->frequency; 865 865 Msg.Data[2] = 12000000; 866 866 ··· 915 915 int ret; 916 916 917 917 struct { 918 - struct SmsMsgHdr_ST Msg; 918 + struct sms_msg_hdr Msg; 919 919 u32 Data[4]; 920 920 } Msg; 921 921 922 922 fe->dtv_property_cache.delivery_system = SYS_ISDBT; 923 923 924 - Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 925 - Msg.Msg.msgDstId = HIF_TASK; 926 - Msg.Msg.msgFlags = 0; 927 - Msg.Msg.msgType = MSG_SMS_ISDBT_TUNE_REQ; 928 - Msg.Msg.msgLength = sizeof(Msg); 924 + Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID; 925 + Msg.Msg.msg_dst_id = HIF_TASK; 926 + Msg.Msg.msg_flags = 0; 927 + Msg.Msg.msg_type = MSG_SMS_ISDBT_TUNE_REQ; 928 + Msg.Msg.msg_length = sizeof(Msg); 929 929 930 930 if (c->isdbt_sb_segment_idx == -1) 931 931 c->isdbt_sb_segment_idx = 0;
+16 -16
drivers/media/common/siano/smsdvb.h
··· 57 57 int feed_users; 58 58 bool has_tuned; 59 59 60 - /* Stats debugfs data */ 60 + /* stats debugfs data */ 61 61 struct dentry *debugfs; 62 62 63 63 struct smsdvb_debugfs *debug_data; ··· 74 74 struct RECEPTION_STATISTICS_PER_SLICES_S { 75 75 u32 result; 76 76 u32 snr; 77 - s32 inBandPower; 78 - u32 tsPackets; 79 - u32 etsPackets; 77 + s32 in_band_power; 78 + u32 ts_packets; 79 + u32 ets_packets; 80 80 u32 constellation; 81 - u32 hpCode; 82 - u32 tpsSrvIndLP; 83 - u32 tpsSrvIndHP; 84 - u32 cellId; 81 + u32 hp_code; 82 + u32 tps_srv_ind_lp; 83 + u32 tps_srv_ind_hp; 84 + u32 cell_id; 85 85 u32 reason; 86 - u32 requestId; 87 - u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 86 + u32 request_id; 87 + u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 88 88 89 89 u32 BER; /* Post Viterbi BER [1E-5] */ 90 90 s32 RSSI; /* dBm */ 91 - s32 CarrierOffset; /* Carrier Offset in bin/1024 */ 91 + s32 carrier_offset; /* Carrier Offset in bin/1024 */ 92 92 93 - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ 94 - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 93 + u32 is_rf_locked; /* 0 - not locked, 1 - locked */ 94 + u32 is_demod_locked; /* 0 - not locked, 1 - locked */ 95 95 96 - u32 BERBitCount; /* Total number of SYNC bits. */ 97 - u32 BERErrorCount; /* Number of erronous SYNC bits. */ 96 + u32 ber_bit_count; /* Total number of SYNC bits. */ 97 + u32 ber_error_count; /* Number of erronous SYNC bits. */ 98 98 99 99 s32 MRC_SNR; /* dB */ 100 - s32 MRC_InBandPwr; /* In band power in dBM */ 100 + s32 mrc_in_band_pwr; /* In band power in dBM */ 101 101 s32 MRC_RSSI; /* dBm */ 102 102 }; 103 103
+15 -15
drivers/media/common/siano/smsendian.c
··· 28 28 void smsendian_handle_tx_message(void *buffer) 29 29 { 30 30 #ifdef __BIG_ENDIAN 31 - struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; 31 + struct sms_msg_data *msg = (struct sms_msg_data *)buffer; 32 32 int i; 33 33 int msgWords; 34 34 35 - switch (msg->xMsgHeader.msgType) { 35 + switch (msg->x_msg_header.msg_type) { 36 36 case MSG_SMS_DATA_DOWNLOAD_REQ: 37 37 { 38 38 msg->msgData[0] = le32_to_cpu(msg->msgData[0]); ··· 40 40 } 41 41 42 42 default: 43 - msgWords = (msg->xMsgHeader.msgLength - 44 - sizeof(struct SmsMsgHdr_ST))/4; 43 + msgWords = (msg->x_msg_header.msg_length - 44 + sizeof(struct sms_msg_hdr))/4; 45 45 46 46 for (i = 0; i < msgWords; i++) 47 47 msg->msgData[i] = le32_to_cpu(msg->msgData[i]); ··· 55 55 void smsendian_handle_rx_message(void *buffer) 56 56 { 57 57 #ifdef __BIG_ENDIAN 58 - struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; 58 + struct sms_msg_data *msg = (struct sms_msg_data *)buffer; 59 59 int i; 60 60 int msgWords; 61 61 62 - switch (msg->xMsgHeader.msgType) { 62 + switch (msg->x_msg_header.msg_type) { 63 63 case MSG_SMS_GET_VERSION_EX_RES: 64 64 { 65 - struct SmsVersionRes_ST *ver = 66 - (struct SmsVersionRes_ST *) msg; 67 - ver->ChipModel = le16_to_cpu(ver->ChipModel); 65 + struct sms_version_res *ver = 66 + (struct sms_version_res *) msg; 67 + ver->chip_model = le16_to_cpu(ver->chip_model); 68 68 break; 69 69 } 70 70 ··· 77 77 78 78 default: 79 79 { 80 - msgWords = (msg->xMsgHeader.msgLength - 81 - sizeof(struct SmsMsgHdr_ST))/4; 80 + msgWords = (msg->x_msg_header.msg_length - 81 + sizeof(struct sms_msg_hdr))/4; 82 82 83 83 for (i = 0; i < msgWords; i++) 84 84 msg->msgData[i] = le32_to_cpu(msg->msgData[i]); ··· 93 93 void smsendian_handle_message_header(void *msg) 94 94 { 95 95 #ifdef __BIG_ENDIAN 96 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)msg; 96 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg; 97 97 98 - phdr->msgType = le16_to_cpu(phdr->msgType); 99 - phdr->msgLength = le16_to_cpu(phdr->msgLength); 100 - phdr->msgFlags = le16_to_cpu(phdr->msgFlags); 98 + phdr->msg_type = le16_to_cpu(phdr->msg_type); 99 + phdr->msg_length = le16_to_cpu(phdr->msg_length); 100 + phdr->msg_flags = le16_to_cpu(phdr->msg_flags); 101 101 #endif /* __BIG_ENDIAN */ 102 102 } 103 103 EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
+9 -9
drivers/media/mmc/siano/smssdio.c
··· 98 98 99 99 sdio_claim_host(smsdev->func); 100 100 101 - smsendian_handle_tx_message((struct SmsMsgData_ST *) buffer); 101 + smsendian_handle_tx_message((struct sms_msg_data *) buffer); 102 102 while (size >= smsdev->func->cur_blksize) { 103 103 ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, 104 104 buffer, smsdev->func->cur_blksize); ··· 130 130 131 131 struct smssdio_device *smsdev; 132 132 struct smscore_buffer_t *cb; 133 - struct SmsMsgHdr_ST *hdr; 133 + struct sms_msg_hdr *hdr; 134 134 size_t size; 135 135 136 136 smsdev = sdio_get_drvdata(func); ··· 163 163 164 164 hdr = cb->p; 165 165 166 - if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) { 166 + if (hdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG) { 167 167 smsdev->split_cb = cb; 168 168 return; 169 169 } 170 170 171 - if (hdr->msgLength > smsdev->func->cur_blksize) 172 - size = hdr->msgLength - smsdev->func->cur_blksize; 171 + if (hdr->msg_length > smsdev->func->cur_blksize) 172 + size = hdr->msg_length - smsdev->func->cur_blksize; 173 173 else 174 174 size = 0; 175 175 } else { 176 176 cb = smsdev->split_cb; 177 177 hdr = cb->p; 178 178 179 - size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST); 179 + size = hdr->msg_length - sizeof(struct sms_msg_hdr); 180 180 181 181 smsdev->split_cb = NULL; 182 182 } ··· 184 184 if (size) { 185 185 void *buffer; 186 186 187 - buffer = cb->p + (hdr->msgLength - size); 187 + buffer = cb->p + (hdr->msg_length - size); 188 188 size = ALIGN(size, SMSSDIO_BLOCK_SIZE); 189 189 190 190 BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE); ··· 230 230 } 231 231 } 232 232 233 - cb->size = hdr->msgLength; 233 + cb->size = hdr->msg_length; 234 234 cb->offset = 0; 235 235 236 - smsendian_handle_rx_message((struct SmsMsgData_ST *) cb->p); 236 + smsendian_handle_rx_message((struct sms_msg_data *) cb->p); 237 237 smscore_onresponse(smsdev->coredev, cb); 238 238 } 239 239
+20 -20
drivers/media/usb/siano/smsusb.c
··· 93 93 } 94 94 95 95 if ((urb->actual_length > 0) && (urb->status == 0)) { 96 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; 96 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p; 97 97 98 98 smsendian_handle_message_header(phdr); 99 - if (urb->actual_length >= phdr->msgLength) { 100 - surb->cb->size = phdr->msgLength; 99 + if (urb->actual_length >= phdr->msg_length) { 100 + surb->cb->size = phdr->msg_length; 101 101 102 102 if (dev->response_alignment && 103 - (phdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG)) { 103 + (phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) { 104 104 105 105 surb->cb->offset = 106 106 dev->response_alignment + 107 - ((phdr->msgFlags >> 8) & 3); 107 + ((phdr->msg_flags >> 8) & 3); 108 108 109 109 /* sanity check */ 110 - if (((int) phdr->msgLength + 110 + if (((int) phdr->msg_length + 111 111 surb->cb->offset) > urb->actual_length) { 112 112 sms_err("invalid response " 113 113 "msglen %d offset %d " 114 114 "size %d", 115 - phdr->msgLength, 115 + phdr->msg_length, 116 116 surb->cb->offset, 117 117 urb->actual_length); 118 118 goto exit_and_resubmit; ··· 121 121 /* move buffer pointer and 122 122 * copy header to its new location */ 123 123 memcpy((char *) phdr + surb->cb->offset, 124 - phdr, sizeof(struct SmsMsgHdr_ST)); 124 + phdr, sizeof(struct sms_msg_hdr)); 125 125 } else 126 126 surb->cb->offset = 0; 127 127 128 128 sms_debug("received %s(%d) size: %d", 129 - smscore_translate_msg(phdr->msgType), 130 - phdr->msgType, phdr->msgLength); 129 + smscore_translate_msg(phdr->msg_type), 130 + phdr->msg_type, phdr->msg_length); 131 131 132 - smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr); 132 + smsendian_handle_rx_message((struct sms_msg_data *) phdr); 133 133 134 134 smscore_onresponse(dev->coredev, surb->cb); 135 135 surb->cb = NULL; 136 136 } else { 137 137 sms_err("invalid response " 138 138 "msglen %d actual %d", 139 - phdr->msgLength, urb->actual_length); 139 + phdr->msg_length, urb->actual_length); 140 140 } 141 141 } else 142 142 sms_err("error, urb status %d, %d bytes", ··· 206 206 static int smsusb_sendrequest(void *context, void *buffer, size_t size) 207 207 { 208 208 struct smsusb_device_t *dev = (struct smsusb_device_t *) context; 209 - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer; 209 + struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer; 210 210 int dummy; 211 211 212 212 if (dev->state != SMSUSB_ACTIVE) 213 213 return -ENOENT; 214 214 215 215 sms_debug("sending %s(%d) size: %d", 216 - smscore_translate_msg(phdr->msgType), phdr->msgType, 217 - phdr->msgLength); 216 + smscore_translate_msg(phdr->msg_type), phdr->msg_type, 217 + phdr->msg_length); 218 218 219 - smsendian_handle_tx_message((struct SmsMsgData_ST *) phdr); 220 - smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer); 219 + smsendian_handle_tx_message((struct sms_msg_data *) phdr); 220 + smsendian_handle_message_header((struct sms_msg_hdr *)buffer); 221 221 return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), 222 222 buffer, size, &dummy, 1000); 223 223 } ··· 310 310 311 311 static int smsusb1_setmode(void *context, int mode) 312 312 { 313 - struct SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK, 314 - sizeof(struct SmsMsgHdr_ST), 0 }; 313 + struct sms_msg_hdr Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK, 314 + sizeof(struct sms_msg_hdr), 0 }; 315 315 316 316 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { 317 317 sms_err("invalid firmware id specified %d", mode); ··· 375 375 dev->buffer_size = USB2_BUFFER_SIZE; 376 376 dev->response_alignment = 377 377 le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - 378 - sizeof(struct SmsMsgHdr_ST); 378 + sizeof(struct sms_msg_hdr); 379 379 380 380 params.flags |= SMS_DEVICE_FAMILY2; 381 381 break;