SIM driver question
andreas at eversberg.eu
Fri Jun 15 07:08:43 UTC 2012
eisencah eisenach wrote:
> Is there any reason why in the sim_handler() function, in
> case SIM_STATE_TX_DATA:
> if (!txDoneFlag)
> break; /* wait until data is transmitted */
> /* Disable all interrupt driven functions */
> writew(0xFF, REG_SIM_MASKIT);
> /* Ignore waiting char for RUN GSM ALGORITHM */
> /* TODO: implement proper handling of the "Procedure Bytes"
> than this is no longer needed */
> if(sim_data == 0x88)
> sim_ignore_waiting_char = 1;
> sim_state = SIM_STATE_RX_STATUS;
> calypso_sim_receive(response + length + 1, 2);
> we do "calypso_sim_receive(response + length + 1, 2);" instead of
> "calypso_sim_receive(response + 1, 2);".
> Seems an unnecessary overhead sending back some junk chars there. Or
> I'm missing something?
iirc, there is a reason for that. the response is allocated with length
+ 1 + 2. at the end of the response string, there are the status bytes,
so "length + 1" is added, so the status will appear at the end of the
response message. the upper layer always reads the status from the last
two bytes. if you would remove the length, the status would be at the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the baseband-devel