if (ret == 0) {
addr1 = param.addr1addr2;
- pos = sprintf(pbuf, "ignoring traffic from ");
+ pos = sprintf(pbuf, "BT includes node ");
pbuf += pos;
pos = eth_addr2str(addr1, pbuf);
pbuf += pos;
return -EFAULT;
}
+ lbs_deb_leave(LBS_DEB_IOCTL);
+ return 0 ;
+}
+
+/**
+ * @brief Sets inverted state of blacklist (non-zero if inverted)
+ * @param priv A pointer to wlan_private structure
+ * @param req A pointer to ifreq structure
+ * @return 0 --success, otherwise fail
+ */
+static int wlan_bt_set_invert_ioctl(wlan_private * priv, struct ifreq *req)
+{
+ int ret;
+ struct iwreq *wrq = (struct iwreq *)req;
+ union {
+ int id;
+ char addr1addr2[2 * ETH_ALEN];
+ } param;
+
+ lbs_deb_enter(LBS_DEB_IOCTL);
+
+ param.id = SUBCMD_DATA(wrq) ;
+ ret = libertas_prepare_and_send_command(priv, cmd_bt_access,
+ cmd_act_bt_access_set_invert,
+ cmd_option_waitforrsp, 0,
+ (char *)¶m);
+ if (ret != 0)
+ return -EFAULT;
+ lbs_deb_leave(LBS_DEB_IOCTL);
+ return 0;
+}
+
+/**
+ * @brief Gets inverted state of blacklist (non-zero if inverted)
+ * @param priv A pointer to wlan_private structure
+ * @param req A pointer to ifreq structure
+ * @return 0 --success, otherwise fail
+ */
+static int wlan_bt_get_invert_ioctl(wlan_private * priv, struct ifreq *req)
+{
+ int ret;
+ union {
+ int id;
+ char addr1addr2[2 * ETH_ALEN];
+ } param;
+
+ lbs_deb_enter(LBS_DEB_IOCTL);
+
+ ret = libertas_prepare_and_send_command(priv, cmd_bt_access,
+ cmd_act_bt_access_get_invert,
+ cmd_option_waitforrsp, 0,
+ (char *)¶m);
+
+ if (ret == 0)
+ req->ifr_data = (char *)(le32_to_cpu(param.id));
+ else
+ return -EFAULT;
+
lbs_deb_leave(LBS_DEB_IOCTL);
return 0;
}
else
fwt_access.dir = FWT_DEFAULT_DIR;
+ if ((ptr = next_param(ptr)))
+ fwt_access.rate = (u8) simple_strtoul(ptr, &ptr, 10);
+ else
+ fwt_access.rate = FWT_DEFAULT_RATE;
+
if ((ptr = next_param(ptr)))
fwt_access.ssn =
cpu_to_le32(simple_strtoul(ptr, &ptr, 10));
buf += eth_addr2str(fwt_access.da, buf);
buf += sprintf(buf, " ");
buf += eth_addr2str(fwt_access.ra, buf);
+ buf += sprintf(buf, " %u", fwt_access.valid);
buf += sprintf(buf, " %u", le32_to_cpu(fwt_access.metric));
buf += sprintf(buf, " %u", fwt_access.dir);
+ buf += sprintf(buf, " %u", fwt_access.rate);
buf += sprintf(buf, " %u", le32_to_cpu(fwt_access.ssn));
buf += sprintf(buf, " %u", le32_to_cpu(fwt_access.dsn));
buf += sprintf(buf, " %u", fwt_access.hopcount);
buf += sprintf(buf, " %u", fwt_access.ttl);
buf += sprintf(buf, " %u", le32_to_cpu(fwt_access.expiration));
buf += sprintf(buf, " %u", fwt_access.sleepmode);
- buf += sprintf(buf, " %u", le32_to_cpu(fwt_access.snr));
+ buf += sprintf(buf, " %u ", le32_to_cpu(fwt_access.snr));
+ buf += eth_addr2str(fwt_access.prec, buf);
}
/**
ret = wlan_mesh_set_ttl_ioctl(priv, idata);
break;
+ case WLAN_SUBCMD_BT_SET_INVERT:
+ ret = wlan_bt_set_invert_ioctl(priv, req);
+ break ;
+
default:
ret = -EOPNOTSUPP;
break;
ret = wlan_mesh_get_ttl_ioctl(priv, req);
break;
+ case WLAN_SUBCMD_BT_GET_INVERT:
+ ret = wlan_bt_get_invert_ioctl(priv, req);
+ break ;
+
default:
ret = -EOPNOTSUPP;
#define WLAN_SUBCMD_FWT_CLEANUP 15
#define WLAN_SUBCMD_FWT_TIME 16
#define WLAN_SUBCMD_MESH_GET_TTL 17
+#define WLAN_SUBCMD_BT_GET_INVERT 18
#define WLAN_SETONEINT_GETNONE (WLANIOCTL + 24)
#define WLANSETREGION 8
#define WLAN_SUBCMD_MESH_SET_TTL 18
+#define WLAN_SUBCMD_BT_SET_INVERT 19
#define WLAN_SET128CHAR_GET128CHAR (WLANIOCTL + 25)
#define WLAN_SUBCMD_BT_ADD 18
#define WLAN_SUBCMD_BT_DEL 19
#define WLAN_SUBCMD_BT_LIST 20
-#define WLAN_SUBCMD_FWT_ADD 21
-#define WLAN_SUBCMD_FWT_DEL 22
-#define WLAN_SUBCMD_FWT_LOOKUP 23
-#define WLAN_SUBCMD_FWT_LIST_NEIGHBOR 24
+#define WLAN_SUBCMD_FWT_ADD 21
+#define WLAN_SUBCMD_FWT_DEL 22
+#define WLAN_SUBCMD_FWT_LOOKUP 23
+#define WLAN_SUBCMD_FWT_LIST_NEIGHBOR 24
#define WLAN_SUBCMD_FWT_LIST 25
-#define WLAN_SUBCMD_FWT_LIST_ROUTE 26
+#define WLAN_SUBCMD_FWT_LIST_ROUTE 26
#define WLAN_SET_GET_SIXTEEN_INT (WLANIOCTL + 29)
#define WLAN_LED_GPIO_CTRL 5