carl9170 toolchain: update to gcc 9.1.0
[carl9170fw.git] / carlfw / src / hostif.c
index ba7a6e102ed19645f3404f2bf1fa9dec71b5a380..06726dbdf7d9c6e47b9556ef0a550c4b6c61a205 100644 (file)
@@ -19,8 +19,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "carl9170.h"
@@ -214,10 +213,14 @@ void handle_cmd(struct carl9170_rsp *resp)
                fw.reboot = 1;
                break;
 
-       case CARL9170_CMD_READ_TSF:
+       case CARL9170_CMD_READ_TSF: {
+               uint32_t tmptsf[2];
+
+               read_tsf(tmptsf);
                resp->hdr.len = 8;
-               read_tsf((uint32_t *)resp->tsf.tsf);
+               memcpy(resp->tsf.tsf, tmptsf, sizeof(tmptsf));
                break;
+               }
 
        case CARL9170_CMD_RX_FILTER:
                resp->hdr.len = 0;
@@ -235,7 +238,12 @@ void handle_cmd(struct carl9170_rsp *resp)
                memset(&fw.tally, 0, sizeof(struct carl9170_tally_rsp));
                break;
 
-#ifdef CONFIG_CARL9170FW_CAB_QUEUE
+       case CARL9170_CMD_WREGB:
+               resp->hdr.len = 0;
+               for (i = 0; i < MIN(cmd->wregb.count, cmd->hdr.len - 8); i++)
+                       setb(cmd->wregb.addr + i, cmd->wregb.val[i]);
+               break;
+
        case CARL9170_CMD_BCN_CTRL:
                resp->hdr.len = 0;
 
@@ -250,7 +258,6 @@ void handle_cmd(struct carl9170_rsp *resp)
                        fw.wlan.cab_flush_trigger[cmd->bcn_ctrl.vif_id] = CARL9170_CAB_TRIGGER_EMPTY;
                }
                break;
-#endif /* CONFIG_CARL9170FW_CAB_QUEUE */
 
 #ifdef CONFIG_CARL9170FW_SECURITY_ENGINE
        case CARL9170_CMD_EKEY: