driver: update ring buffer logic