static void qmi_process_unicast_wds_msg(struct qmi_ctxt *ctxt, struct qmi_msg *msg) { unsigned err; switch (msg->type) { case 0x0021: if (qmi_get_status(msg, &err)) { printk(KERN_ERR "qmi: wds: network stop failed (%04x)\n", err); } else { printk(KERN_INFO "qmi: wds: network stopped\n"); ctxt->state = STATE_OFFLINE; ctxt->state_dirty = 1; } break; case 0x0020: if (qmi_get_status(msg, &err)) { printk(KERN_ERR "qmi: wds: network start failed (%04x)\n", err); //++Make pdp state always be sent to QMI channel when activating PDP context fails printk(KERN_ERR "qmi: wds: Make pdp state always be sent to QMI channel when activating PDP context fails .\n"); ctxt->state = STATE_OFFLINE; ctxt->state_dirty = 1; //--Make pdp state always be sent to QMI channel when activating PDP context fails if (msg->size == 0x000c && (msg->tlv)[10] == 0x0b) { printk(KERN_ERR "qmi: wds: pdp activation collided with CCFC\n"); ctxt->state = STATE_OFFLINE; ctxt->state_dirty = 1; } if (msg->size == 0x000c && (msg->tlv)[10] == 0x0c) { printk(KERN_ERR "qmi: wds: pdp activation failed. Cause: Operator-determined barring\n"); ctxt->state = STATE_OFFLINE; ctxt->state_dirty = 1; } } else if (qmi_get_tlv(msg, 0x01, sizeof(ctxt->wds_handle), &ctxt->wds_handle)) { printk(KERN_INFO "qmi: wds no handle?\n"); } else { printk(KERN_INFO "qmi: wds: got handle 0x%08x\n", ctxt->wds_handle); } break; case 0x002D: printk("qmi: got network profile\n"); if (ctxt->state == STATE_QUERYING) { qmi_read_runtime_profile(ctxt, msg); ctxt->state = STATE_ONLINE; ctxt->state_dirty = 1; } break; default: printk(KERN_ERR "qmi: unknown msg type 0x%04x\n", msg->type); } ctxt->wds_busy = 0; }
static void qmi_process_unicast_wds_msg(struct qmi_ctxt *ctxt, struct qmi_msg *msg) { unsigned err; switch (msg->type) { case 0x0021: if (qmi_get_status(msg, &err)) { printk(KERN_ERR "qmi: wds: network stop failed (%04x)\n", err); } else { printk(KERN_INFO "qmi: wds: network stopped\n"); ctxt->state = STATE_OFFLINE; ctxt->state_dirty = 1; } break; case 0x0020: if (qmi_get_status(msg, &err)) { printk(KERN_ERR "qmi: wds: network start failed (%04x)\n", err); } else if (qmi_get_tlv(msg, 0x01, sizeof(ctxt->wds_handle), &ctxt->wds_handle)) { printk(KERN_INFO "qmi: wds no handle?\n"); } else { printk(KERN_INFO "qmi: wds: got handle 0x%08x\n", ctxt->wds_handle); } break; case 0x002D: printk("qmi: got network profile\n"); if (ctxt->state == STATE_QUERYING) { qmi_read_runtime_profile(ctxt, msg); ctxt->state = STATE_ONLINE; ctxt->state_dirty = 1; } break; default: printk(KERN_ERR "qmi: unknown msg type 0x%04x\n", msg->type); } ctxt->wds_busy = 0; }
static void qmi_process_ctl_msg(struct qmi_ctxt *ctxt, struct qmi_msg *msg) { unsigned err; if (msg->type == 0x0022) { unsigned char n[2]; if (qmi_get_status(msg, &err)) return; if (qmi_get_tlv(msg, 0x01, sizeof(n), n)) return; if (n[0] == QMI_WDS) { D("qmi: ctl: wds use client_id 0x%02x\n", n[1]); ctxt->wds_client_id = n[1]; ctxt->wds_busy = 0; } } }