1
0
Fork 0
forked from nuttx/nuttx-update

drivers: wireless: Refactor gs2200m.c

Summary:
- Remove unnecessay code from gs2200m_irq()
- Fix irq control in case that work_available() returns false

Impact:
- All use cases with gs2200m driver

Testing:
- Tested with spresense:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-08-25 16:07:12 +09:00 committed by Alin Jerpelea
parent 46dd4d8d91
commit 07b4b219cd

View file

@ -3086,26 +3086,22 @@ errout:
static int gs2200m_irq(int irq, FAR void *context, FAR void *arg)
{
FAR struct gs2200m_dev_s *dev;
int ec = 0;
DEBUGASSERT(arg != NULL);
dev = (FAR struct gs2200m_dev_s *)arg;
dev->lower->dready(&ec);
ASSERT(0 < ec);
wlinfo(">>>> \n");
/* NOTE: Disable gs2200m irq during processing */
dev->lower->disable();
if (!work_available(&dev->irq_work))
{
wlwarn("*** warning: there is still pending work **** \n");
return 0;
}
/* NOTE: Disable gs2200m irq during processing */
dev->lower->disable();
return work_queue(GS2200MWORK, &dev->irq_work, gs2200m_irq_worker,
(FAR void *)dev, 0);
}