drivers: modem: fix race condition when waiting on cmd reply
drivers: modem: fix race condition when waiting on cmd reply

Command was sent first, then a semaphore was reset. This semaphore could
be released by received reply even before semaphore was reset. This is
quite unlikely, but possible result of race condition.

Move k_sem_reset() call before attempt to send command over modem
interface. This makes sure that receiving reply momentarily after
sending request will always be handled properly.

Signed-off-by: Marcin Niestroj <63506c06cfbc47ace147db1702f6e751f5ac2132@grinn-global.com>

Vudentz/zephyr,galak/zephyr,finikorg/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,nashif/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr