void eemcs_ccci_release_rx_skb(KAL_UINT32 port_idx, KAL_UINT32 cnt, struct sk_buff *skb) { if (ccci_port_info[port_idx].rx_flow_ctrl_limit) { mtlte_df_DL_release_buff(SDIO_RXQ(ccci_port_info[port_idx].rxq_id), cnt, skb); } }
static ssize_t device_write(struct file *filp, const char __user *buff, size_t len, loff_t *off) { char *msg_ptr; char *cmd_ptr; char *level_num_str; unsigned int level_num; if (len > 199) return -EINVAL; if(copy_from_user(msg, buff, len)) { return -EINVAL; } msg[len] = '\0'; //msg_ptr = msg; //msg_ptr2 = msg2; //msg_ptr = strsep(&msg_ptr2, " "); if(0 == strcmp(msg, "lte_sdio_on")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_on(); } else if(0 == strcmp(msg, "lte_sdio_off")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_off(); } else if(0 == strcmp(msg, "device_pow_on")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_device_power_on(); } else if(0 == strcmp(msg, "device_pow_off")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_device_power_off(); } else if(0 == strcmp(msg, "card_identify")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_card_identify(); } else if(0 == strcmp(msg, "card_remove")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_card_remove(); } else if(0 == strcmp(msg, "eirq_mask")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_disable_eirq(); } else if(0 == strcmp(msg, "eirq_unmask")) { KAL_RAWPRINT (("Perform: %s\n", msg)); lte_sdio_enable_eirq(); } else if(0 == strcmp(msg, "manual_enable_sleep")) { KAL_RAWPRINT (("Perform: %s\n", msg)); mtlte_hif_sdio_enable_fw_own_back(1); mtlte_sys_sdio_kick_thread(0); //temp_sdio_enable_sleep = 1; } else if(0 == strcmp(msg, "manual_disable_sleep")) { KAL_RAWPRINT (("Perform: %s\n", msg)); mtlte_hif_sdio_enable_fw_own_back(0); mtlte_sys_sdio_kick_thread(0); //temp_sdio_enable_sleep = 0; } #if USING_WAKE_MD_EINT else if(0 == strcmp(msg, "Read_fw_own")) { KAL_RAWPRINT (("Perform: %s\n", msg)); KAL_RAWPRINT (("SDIO fw_own = %d \n", mtlte_hif_sdio_check_fw_own())); } else if(0 == strcmp(msg, "Read_give_own_time")) { KAL_RAWPRINT (("Perform: %s\n", msg)); KAL_RAWPRINT (("SDIO give_own_counter = %d \n", give_own_counter)); } #endif #if FORMAL_DL_FLOW_CONTROL else if(0 == strcmp(msg, "show_flow_control_record")) { KAL_RAWPRINT (("Perform: %s\n", msg)); for(level_num=0; level_num<RXQ_NUM; level_num++){ KAL_RAWPRINT (("Biggest num of sk_buff of RXQ%d = %d \n", level_num, mtlte_df_DL_read_fl_ctrl_record(level_num))); } } #endif #if FORMAL_DL_FLOW_CONTROL_TEST else if(0 == strcmp(msg, "flow_control_status")) { KAL_RAWPRINT (("Perform: %s\n", msg)); for(level_num=0; level_num<RXQ_NUM; level_num++){ mtlte_df_DL_fl_ctrl_print_status(level_num); } mtlte_hif_print_fl_ctrl(); } #endif else { msg_ptr = msg; cmd_ptr = strsep(&msg_ptr, " "); if(0 == strcmp(cmd_ptr, "set_dbg_msg_level")){ level_num_str = strsep(&msg_ptr, " "); level_num = level_num_str[0] - 0x30; mtlte_kal_set_dbglevel(level_num); KAL_RAWPRINT (("dbg_msg_level : change to %s\n", level_num_str)); } #if USING_WAKE_MD_EINT else if(0 == strcmp(cmd_ptr, "set_ownback_delay_ratio")){ level_num_str = strsep(&msg_ptr, " "); level_num = str_to_int_main(level_num_str); ownback_delay_ratio = level_num; if(level_num){ KAL_RAWPRINT (("set_ownback_delay_ratio : change to %d/%d = 1/%d second. \n", ownback_delay_ratio, HZ, ownback_delay_ratio)); }else{ KAL_RAWPRINT (("set_ownback_delay_ratio : Turn off delay ownback!! \n")); } } #endif #if INTEGRATION_DEBUG else if(0 == strcmp(cmd_ptr, "switch_throughput_log")) { level_num_str = strsep(&msg_ptr, " "); level_num = level_num_str[0] - 0x30; KAL_RAWPRINT (("Perform: %s %d \n", msg, level_num)); if(level_num == 0) { eemcs_sdio_throughput_log = 0; log_sdio_ul_now = 0; log_sdio_dl_now = 0; log_sdio_ul_history = 0; log_sdio_dl_history = 0; log_sdio_buf_pool = 0; log_sdio_ul_txqcnt = 0; } else{eemcs_sdio_throughput_log = 1;} if(level_num == 1){log_sdio_ul_now = 1;} if(level_num == 2){log_sdio_dl_now = 1;} if(level_num == 3){log_sdio_ul_history = 1;} if(level_num == 4){log_sdio_dl_history = 1;} if(level_num == 5){log_sdio_buf_pool = 1;} if(level_num == 6){log_sdio_ul_txqcnt = 1;} } #endif #if FORMAL_DL_FLOW_CONTROL_TEST if(0 == strcmp(cmd_ptr, "manual_release_DL_buff")){ level_num_str = strsep(&msg_ptr, " "); level_num = level_num_str[0] - 0x30; level_num_str = strsep(&msg_ptr, " "); mtlte_df_DL_release_buff(level_num, str_to_int_main(level_num_str), NULL); KAL_RAWPRINT (("manual_release_DL_buff : DLQ%d - %d\n", level_num, str_to_int_main(level_num_str))); } #endif else{ KAL_RAWPRINT (("Unknown cmd : %s\n", msg)); } } return len; }