Lines Matching full:profile
50 int ql_bridge_mode_detect(PROFILE_T *profile) { in ql_bridge_mode_detect() argument
51 …const char *ifname = profile->qmapnet_adapter[0] ? profile->qmapnet_adapter : profile->usbnet_adap… in ql_bridge_mode_detect()
60 driver = profile->driver_name; in ql_bridge_mode_detect()
90 …if (strstr(bridge_ipv4, "/sys/class/net/") || profile->qmap_mode == 0 || profile->qmap_mode == 1) { in ql_bridge_mode_detect()
91 snprintf(ipv4, sizeof(ipv4), "0x%x", profile->ipv4.Address); in ql_bridge_mode_detect()
96 snprintf(ipv4, sizeof(ipv4), "0x%x:%d", profile->ipv4.Address, profile->muxid); in ql_bridge_mode_detect()
104 int ql_enable_qmi_wwan_rawip_mode(PROFILE_T *profile) { in ql_enable_qmi_wwan_rawip_mode() argument
110 if (!qmidev_is_qmiwwan(profile->qmichannel)) in ql_enable_qmi_wwan_rawip_mode()
113 snprintf(filename, sizeof(filename), "/sys/class/net/%s/qmi/rawip", profile->usbnet_adapter); in ql_enable_qmi_wwan_rawip_mode()
140 int ql_driver_type_detect(PROFILE_T *profile) { in ql_driver_type_detect() argument
141 if (qmidev_is_gobinet(profile->qmichannel)) { in ql_driver_type_detect()
142 profile->qmi_ops = &gobi_qmidev_ops; in ql_driver_type_detect()
145 profile->qmi_ops = &qmiwwan_qmidev_ops; in ql_driver_type_detect()
147 qmidev_send = profile->qmi_ops->send; in ql_driver_type_detect()
152 void ql_set_driver_bridge_mode(PROFILE_T *profile) { in ql_set_driver_bridge_mode() argument
156 if(profile->qmap_mode) in ql_set_driver_bridge_mode()
157 … snprintf(filename, sizeof(filename), "/sys/class/net/%s/bridge_mode", profile->qmapnet_adapter); in ql_set_driver_bridge_mode()
159 … snprintf(filename, sizeof(filename), "/sys/class/net/%s/bridge_mode", profile->usbnet_adapter); in ql_set_driver_bridge_mode()
160 snprintf(enable, sizeof(enable), "%02d\n", profile->enable_bridge); in ql_set_driver_bridge_mode()
164 static int ql_qmi_qmap_mode_detect(PROFILE_T *profile) { in ql_qmi_qmap_mode_detect() argument
174 …snprintf(pl->linkname, sizeof(pl->linkname), "/sys/class/net/%s/device/driver", profile->usbnet_ad… in ql_qmi_qmap_mode_detect()
179 strncpy(profile->driver_name, &pl->filename[n+1], sizeof(profile->driver_name)); in ql_qmi_qmap_mode_detect()
181 ql_get_driver_rmnet_info(profile, &profile->rmnet_info); in ql_qmi_qmap_mode_detect()
182 if (profile->rmnet_info.size) { in ql_qmi_qmap_mode_detect()
183 profile->qmap_mode = profile->rmnet_info.qmap_mode; in ql_qmi_qmap_mode_detect()
184 if (profile->qmap_mode) { in ql_qmi_qmap_mode_detect()
185 int offset_id = (profile->muxid == 0)? profile->pdp - 1 : profile->muxid - 0x81; in ql_qmi_qmap_mode_detect()
187 if (profile->qmap_mode == 1) in ql_qmi_qmap_mode_detect()
189 profile->muxid = profile->rmnet_info.mux_id[offset_id]; in ql_qmi_qmap_mode_detect()
190 …strncpy(profile->qmapnet_adapter, profile->rmnet_info.ifname[offset_id], sizeof(profile->qmapnet_a… in ql_qmi_qmap_mode_detect()
191 profile->qmap_size = profile->rmnet_info.rx_urb_size; in ql_qmi_qmap_mode_detect()
192 profile->qmap_version = profile->rmnet_info.qmap_version; in ql_qmi_qmap_mode_detect()
198 …snprintf(pl->filename, sizeof(pl->filename), "/sys/class/net/%s/qmap_mode", profile->usbnet_adapte… in ql_qmi_qmap_mode_detect()
205 …snprintf(pl->filename, sizeof(pl->filename), "/sys/module/%s/parameters/qmap_mode", profile->drive… in ql_qmi_qmap_mode_detect()
212 …filename), "/sys/class/net/%s/device/driver/module/parameters/qmap_mode", profile->usbnet_adapter); in ql_qmi_qmap_mode_detect()
225 profile->qmap_mode = atoi(buf); in ql_qmi_qmap_mode_detect()
227 if (profile->qmap_mode > 1) { in ql_qmi_qmap_mode_detect()
228 if(!profile->muxid) in ql_qmi_qmap_mode_detect()
229 profile->muxid = profile->pdp + 0x80; //muxis is 0x8X for PDN-X in ql_qmi_qmap_mode_detect()
230 snprintf(profile->qmapnet_adapter, sizeof(profile->qmapnet_adapter), in ql_qmi_qmap_mode_detect()
231 "%.16s.%d", profile->usbnet_adapter, profile->muxid - 0x80); in ql_qmi_qmap_mode_detect()
232 } if (profile->qmap_mode == 1) { in ql_qmi_qmap_mode_detect()
233 profile->muxid = 0x81; in ql_qmi_qmap_mode_detect()
234 … strncpy(profile->qmapnet_adapter, profile->usbnet_adapter, sizeof(profile->qmapnet_adapter)); in ql_qmi_qmap_mode_detect()
238 else if (qmidev_is_qmiwwan(profile->qmichannel)) { in ql_qmi_qmap_mode_detect()
239 snprintf(pl->filename, sizeof(pl->filename), "/sys/class/net/qmimux%d", profile->pdp - 1); in ql_qmi_qmap_mode_detect()
248 …snprintf(pl->filename, sizeof(pl->filename), "/sys/class/net/%s/qmi/add_mux", profile->usbnet_adap… in ql_qmi_qmap_mode_detect()
251 dbg_time("If use QMAP by /sys/class/net/%s/qmi/add_mux", profile->usbnet_adapter); in ql_qmi_qmap_mode_detect()
284 profile->qmap_mode = n/5; //0x11\n0x22\n0x33\n in ql_qmi_qmap_mode_detect()
285 if (profile->qmap_mode > 1) { in ql_qmi_qmap_mode_detect()
287 if(!profile->muxid) { in ql_qmi_qmap_mode_detect()
288 … profile->muxid = (buf[5*(profile->pdp - 1) + 2] - '0')*16 + (buf[5*(profile->pdp - 1) + 3] - '0'); in ql_qmi_qmap_mode_detect()
289 …snprintf(profile->qmapnet_adapter, sizeof(profile->qmapnet_adapter), "qmimux%d", profile->pdp - 1); in ql_qmi_qmap_mode_detect()
291 …profile->muxid = (buf[5*(profile->muxid - 0x81) + 2] - '0')*16 + (buf[5*(profile->muxid - 0x81) + … in ql_qmi_qmap_mode_detect()
292 …snprintf(profile->qmapnet_adapter, sizeof(profile->qmapnet_adapter), "qmimux%d", profile->muxid - … in ql_qmi_qmap_mode_detect()
294 } else if (profile->qmap_mode == 1) { in ql_qmi_qmap_mode_detect()
295 profile->muxid = (buf[5*0 + 2] - '0')*16 + (buf[5*0 + 3] - '0'); in ql_qmi_qmap_mode_detect()
296 snprintf(profile->qmapnet_adapter, sizeof(profile->qmapnet_adapter), in ql_qmi_qmap_mode_detect()
303 if (profile->qmap_mode) { in ql_qmi_qmap_mode_detect()
304 if (profile->qmap_size == 0) { in ql_qmi_qmap_mode_detect()
305 profile->qmap_size = 16*1024; in ql_qmi_qmap_mode_detect()
306 …snprintf(pl->filename, sizeof(pl->filename), "/sys/class/net/%s/qmap_size", profile->usbnet_adapte… in ql_qmi_qmap_mode_detect()
312 profile->qmap_size = atoi(buf); in ql_qmi_qmap_mode_detect()
317 if (profile->qmap_version == 0) { in ql_qmi_qmap_mode_detect()
318 profile->qmap_version = WDA_DL_DATA_AGG_QMAP_ENABLED; in ql_qmi_qmap_mode_detect()
322 …profile->qmap_mode, profile->qmap_version, profile->qmap_size, profile->muxid, profile->qmapnet_ad… in ql_qmi_qmap_mode_detect()
324 ql_set_driver_bridge_mode(profile); in ql_qmi_qmap_mode_detect()
330 static int ql_mbim_usb_vlan_mode_detect(PROFILE_T *profile) { in ql_mbim_usb_vlan_mode_detect() argument
333 snprintf(tmp, sizeof(tmp), "/sys/class/net/%s.%d", profile->usbnet_adapter, profile->pdp); in ql_mbim_usb_vlan_mode_detect()
335 profile->qmap_mode = 4; in ql_mbim_usb_vlan_mode_detect()
336 profile->muxid = profile->pdp; in ql_mbim_usb_vlan_mode_detect()
337 …strncpy(profile->qmapnet_adapter, &tmp[strlen("/sys/class/net/")], sizeof(profile->qmapnet_adapter… in ql_mbim_usb_vlan_mode_detect()
340 profile->qmap_mode, profile->muxid, profile->qmapnet_adapter); in ql_mbim_usb_vlan_mode_detect()
346 static int ql_mbim_mhi_qmap_mode_detect(PROFILE_T *profile) { in ql_mbim_mhi_qmap_mode_detect() argument
347 ql_get_driver_rmnet_info(profile, &profile->rmnet_info); in ql_mbim_mhi_qmap_mode_detect()
348 if (profile->rmnet_info.size) { in ql_mbim_mhi_qmap_mode_detect()
349 profile->qmap_mode = profile->rmnet_info.qmap_mode; in ql_mbim_mhi_qmap_mode_detect()
350 if (profile->qmap_mode) { in ql_mbim_mhi_qmap_mode_detect()
351 int offset_id = profile->pdp - 1; in ql_mbim_mhi_qmap_mode_detect()
353 if (profile->qmap_mode == 1) in ql_mbim_mhi_qmap_mode_detect()
355 profile->muxid = offset_id; in ql_mbim_mhi_qmap_mode_detect()
356 strcpy(profile->qmapnet_adapter, profile->rmnet_info.ifname[offset_id]); in ql_mbim_mhi_qmap_mode_detect()
357 profile->qmap_size = profile->rmnet_info.rx_urb_size; in ql_mbim_mhi_qmap_mode_detect()
358 profile->qmap_version = profile->rmnet_info.qmap_version; in ql_mbim_mhi_qmap_mode_detect()
361 profile->qmap_mode, profile->muxid, profile->qmapnet_adapter); in ql_mbim_mhi_qmap_mode_detect()
371 int ql_qmap_mode_detect(PROFILE_T *profile) { in ql_qmap_mode_detect() argument
372 if (profile->software_interface == SOFTWARE_MBIM) { in ql_qmap_mode_detect()
373 if (profile->hardware_interface == HARDWARE_USB) in ql_qmap_mode_detect()
374 return ql_mbim_usb_vlan_mode_detect(profile); in ql_qmap_mode_detect()
375 else if (profile->hardware_interface == HARDWARE_PCIE) in ql_qmap_mode_detect()
376 return ql_mbim_mhi_qmap_mode_detect(profile); in ql_qmap_mode_detect()
377 } else if (profile->software_interface == SOFTWARE_QMI) { in ql_qmap_mode_detect()
378 return ql_qmi_qmap_mode_detect(profile); in ql_qmap_mode_detect()