rpcd: iwinfo plugin fixes master
rpcd: iwinfo plugin fixes

- Expose supported HT rate information in info call
- Zero out ccode buffer when listing countries

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49395 3c298f89-4303-0410-b956-a3cf2f4a3e73

# #
# Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2013-2016 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
# #
   
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
   
PKG_NAME:=rpcd PKG_NAME:=rpcd
PKG_VERSION:=2016-04-13 PKG_VERSION:=2016-06-30
PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_RELEASE=$(PKG_SOURCE_VERSION)
   
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(OPENWRT_GIT)/project/rpcd.git PKG_SOURCE_URL=$(OPENWRT_GIT)/project/rpcd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME) PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE_VERSION:=73aea9b8b621a1ce034bc6ee00c9d058a40c8a3d PKG_SOURCE_VERSION:=23417e94d25570e6d62542bac46edd51e8e0243a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org> PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
   
PKG_LICENSE:=ISC PKG_LICENSE:=ISC
PKG_LICENSE_FILES:= PKG_LICENSE_FILES:=
   
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
   
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk include $(INCLUDE_DIR)/cmake.mk
   
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/ $(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
endef endef
   
define Package/rpcd/default define Package/rpcd/default
SECTION:=utils SECTION:=utils
CATEGORY:=Base system CATEGORY:=Base system
TITLE:=OpenWrt ubus RPC backend server TITLE:=OpenWrt ubus RPC backend server
DEPENDS:=+libubus +libubox DEPENDS:=+libubus +libubox
endef endef
   
define Package/rpcd define Package/rpcd
$(Package/rpcd/default) $(Package/rpcd/default)
DEPENDS+= +libuci +libblobmsg-json DEPENDS+= +libuci +libblobmsg-json
endef endef
   
define Package/rpcd/description define Package/rpcd/description
This package provides the UBUS RPC backend server to expose various This package provides the UBUS RPC backend server to expose various
functionality to frontend programs via JSON-RPC. functionality to frontend programs via JSON-RPC.
endef endef
   
define Package/rpcd/conffiles define Package/rpcd/conffiles
/etc/config/rpcd /etc/config/rpcd
endef endef
   
define Package/rpcd/install define Package/rpcd/install
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd $(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd
$(INSTALL_DIR) $(1)/sbin $(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) $(PKG_BUILD_DIR)/unauthenticated.json $(1)/usr/share/rpcd/acl.d/unauthenticated.json $(INSTALL_DATA) $(PKG_BUILD_DIR)/unauthenticated.json $(1)/usr/share/rpcd/acl.d/unauthenticated.json
$(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/rpcd.config $(1)/etc/config/rpcd $(INSTALL_CONF) ./files/rpcd.config $(1)/etc/config/rpcd
endef endef
   
   
# 1: plugin name # 1: plugin name
# 2: extra dependencies # 2: extra dependencies
# 3: plugin title/description # 3: plugin title/description
define BuildPlugin define BuildPlugin
   
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1) PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
   
define Package/rpcd-mod-$(1) define Package/rpcd-mod-$(1)
$(Package/rpcd/default) $(Package/rpcd/default)
TITLE+= ($(1) plugin) TITLE+= ($(1) plugin)
DEPENDS+=rpcd $(2) DEPENDS+=rpcd $(2)
endef endef
   
define Package/rpcd-mod-$(1)/description define Package/rpcd-mod-$(1)/description
$(3) $(3)
endef endef
   
define Package/rpcd-mod-$(1)/install define Package/rpcd-mod-$(1)/install
$(INSTALL_DIR) $$(1)/usr/lib/rpcd $(INSTALL_DIR) $$(1)/usr/lib/rpcd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/
endef endef
   
$$(eval $$(call BuildPackage,rpcd-mod-$(1))) $$(eval $$(call BuildPackage,rpcd-mod-$(1)))
   
endef endef
   
$(eval $(call BuildPackage,rpcd)) $(eval $(call BuildPackage,rpcd))
$(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.)) $(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
$(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.)) $(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.))
$(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.)) $(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.))
   
comments