Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

problem with WLAN_ATTRIB_PACK

rajan
2004-09-22
2013-02-17
  • rajan
    rajan
    2004-09-22

    Hi,

        Thanks again.I could solve the problem but i am not sure if it's correct because the packing is not uniform (not 2 bytes always) and is dependent on the structure.So,   I've got some more queries.

    >>So the proper solution is to:
    #define ACXPACK __attribute__ ((packed))
    (short define)
     
    1) Does that mean the default packing is 2 bytes?Does that also mean that the packing the structures is uniform throughout the driver code and is not dependent on the actual size of the structure?

    2) What is the importance of 'acx100_after_interrupt_task' routine?When does that get called?

    rajan

     
    • > 2) What is the importance of 'acx100_after_interrupt_task' routine?When does that get called?

      Some interrupts (at the moment only scan finished, I think) need to configure the card and wait for the ack interrupt (after scan finished perform the associate cmd). So you have to get out of Interrupt Context when you get such an interrupt. Thats what the 'acx100_after_interrupt_task' does.

      Hope that helps,
      Olli

       
  • rajan
    rajan
    2004-09-24

    Thanks Mr.Olli.

    Now i am able to associate my card to a AP but still i've got some more problems.

    >>2) What is the importance of 'acx100_after_interrupt_task' routine?When does that get called?

            Although i can sense the purpose of 'acx100_after_interrupt_task' routine i am unable to get a clear picture of the events that lead to this routine.Sorry to bug you.Can you plz elaborate it further?

    3)I have another one.What's the purpose of 'INIT_WORK' routine in 'acx100_open'?

    Thanks,
    rajan

     
  • Ok, I try to explain more details...

    When you get an HOST_INT_SCAN_COMPLETE interrupt, you want to associate with an access point you found. So you have to do an associate configure cmd (ACX1xx_CMD_JOIN) to tell it the card. The configure cmd sends an CMD_CMP interrupt, but you can't receive this because you already process an interrupt. So you have to leave the interrupt context and execute the associate configure cmd in user context so you can receive the CMD_CMP interrupt.

    The solution was to set up a small job queue and call it by using task queues (or worker tasks in Linux-2.4).
    To use the job queue you have to set the specific job bit in priv->after_interrupt_jobs to high and tell the kernel to call the acx100_after_interrupt task. You do that by calling acx_schedule_after_interrupt_task.

    This job queue is used not only for association but also for the reclibration of the card.

    The INIT_WORK routine is used to set up worker tasks in Linux-2.4.

    Cu,
    Olli

     
  • rajan
    rajan
    2004-09-27

    Thanks a lot Mr.Olli. That has cleared the air surrounding the scan_complete interrupt.

          As i've mentioned iam trying to port this driver to a RTOS for my DSP.My RTOS does not have the luxuries of Linux job queues.
          So, I guess i can safely come out of the interrupt context and appropriately call the 'acx100_after_interrupt_task' without replicating the Linux queues.Plz correct me if i am wrong anywhere.

    rajan

     
    • I don't know the details from your DSP, but if you don't have the problem with first leaving the interrupt context the easiest way for you should be to change only the acx_schedule_after_interrupt_task method.

      Something like that should work for you and your are still compatible to the old interface...

      void acx_schedule_after_interrupt_task(wlandevice_t *priv)
      {
             /* we don't need the job scheduler, call directly */
             acx_after_interrupt_task(priv->netdev);
      }

      Cu,
      Olli

       
  • rajan
    rajan
    2004-09-27

    Thanks again.

    I've tried something similar,seems to be working.My code looks like this

    void acx_schedule_after_interrupt_task(wlandevice_t *priv)
    {

       disable_interupt(); // specific to my DSP

       acx_after_interrupt_task(priv->netdev);

       enable_interrupt();// specific to my DSP

    }
    I shall update the correctness of my code soon.

    Cheers,
    rajan